0% found this document useful (0 votes)
59 views

Assignment Module 6

Uploaded by

Tejas S
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

Assignment Module 6

Uploaded by

Tejas S
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

MODULE 6 PACKAGES

Implement in Python

1. For the dataset “Indian_cities”,


a) Find out top 10 states in female-male sex ratio
b) Find out top 10 cities in total number of graduates

Answer:
col_list = ["name_of_city","total_graduates"]
df = pd. read_csv("C:/Users/Tejas/OneDrive/Desktop/Python Problem
Statements/Indian_cities.csv", usecols=col_list)
print(df["name_of_city"])
print(df["total_graduates"])
x = df["total_graduates"]
y = df["name_of_city"]
z = pd.concat([y, x], axis=1)
print(z)
z = df.sort_values(by='total_graduates',ascending=False)
T = z.head(10)

Output:

c) Find out top 10 cities and their locations in respect of total effective_literacy_rate.

2. For the data set “Indian_cities”


a) Construct histogram on literates_total and comment about the inferences
b) Construct scatter plot between male graduates and female graduates
3. For the data set “Indian_cities”
a) Construct Boxplot on total effective literacy rate and draw inferences
b) Find out the number of null values in each column of the dataset and delete them.

You might also like