Professional Documents
Culture Documents
Ict550 Lab Assignment 2 Sample
Ict550 Lab Assignment 2 Sample
2020970909
CS2404A
1. Import statements. Python modules can get access to code from another module by
importing the file/function using import.
9. Checking the number of empty rows in the excel file. Then droping the empty rows using
dropna(). Saving it to the excel file.
14. Overwriting column with replaced value from 'malaysia' to 'Malaysia'. Case sensitive.
17. Made Taiwan country as a group & replace the value using iteration
SHARIFAH NAJEHAH BINTI SYED SHAMSUDIN
2020970909
CS2404A
18. Made 'United Kingdom' Country group & replace the value using iteration
20. Made Singapore country group & replace the value using iteration
21. Print number of rows using data.shape and format(). Shape[0] is row and shape[1] is
column
SHARIFAH NAJEHAH BINTI SYED SHAMSUDIN
2020970909
CS2404A
22. Use plt.margins(0.20) for data visualization. Axes module of matplotlib library is used to
set or retrieve autoscaling margins.