Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 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,

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.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions