Using Pandas in Python 3.6
1. Use pandas to work on your dataset. [0 marks]
In [1]: import pandas as pd
2. Read the excel file "Movies.xlsx" and name the data frame "Three". [1 mark]
In [2]: Three = pd.read_excel("Movies.xlsx")
3. Remove rows that have any missing values and make sure to assign the clean data frame to "Three". [1 mark]
In []:
Three.dropna(inplace=True)
4. Show the number of rows and columns in the data frame "Three". [1 mark]
In []:
print("Number of rows:", Three.shape[0])
print("Number of columns:", Three.shape[1])
5. Show the columns in the data frame "Three". [1 mark]
In []:
print(Three.columns)
6. Show the top 7 rows in the data frame "Three". [1 mark]
In []:
print(Three.head(7))