Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
19 views

Module 7 Python for data analytics Assignment

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

Module 7 Python for data analytics Assignment

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

MODULE – 7 ASSIGNMENT

Python for data analytics

Please implement Python coding for all the problems.

1) Please take care of missing data present in the “Data.csv” file using python module
“sklearn.impute” and its methods, also collect all the data that has “Salary” less than “70,000”.

2) Subtracting dates:
Python date objects let us treat calendar dates as something similar to numbers: we can
compare them, sort them, add, and even subtract them. Do math with dates in a way that
would be a pain to do by hand. The 2007 Florida hurricane season was one of the busiest on
record, with 8 hurricanes in one year. The first one hit on May 9th, 2007, and the last one hit
on December 13th, 2007. How many days elapsed between the first and last hurricane in
2007?

Instructions:

Import date from datetime.

Create a date object for May 9th, 2007, and assign it to the start variable.

Create a date object for December 13th, 2007, and assign it to the end variable.

Subtract start from end, to print the number of days in the resulting timedelta object.

3) Representing dates in different ways

Date objects in Python have a great number of ways they can be printed out as strings. In
some cases, you want to know the date in a clear, language-agnostic format. In other cases,
you want something which can fit into a paragraph and flow naturally.

Print out the same date, August 26, 1992 (the day that Hurricane Andrew made landfall in
Florida), in a number of different ways, by using the “ .strftime() ” method. Store it in a
variable called “Andrew”.

Instructions:

Print it in the format 'YYYY-MM', 'YYYY-DDD' and 'MONTH (YYYY)'

4) For the dataset “Indian_cities”,

© 360DigiTMG. All Rights Reserved.


a) Find out top 10 states in female-male sex ratio
b) Find out top 10 cities in total number of graduates
c) Find out top 10 cities and their locations in respect of total effective_literacy_rate.

5) 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

6) 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.

© 360DigiTMG. All Rights Reserved.

You might also like