Question: Using Python / Pandas, in a new Jupyter Notebook please do the following: 1.) Create a print statement to output the number of data rows

Using Python / Pandas, in a new Jupyter Notebook please do the following:

1.) Create a print statement to output the number of data rows in the csv file. Format output as "File has %d rows".

2.) In a new cell, display a dataframe containing all series that is sorted by "Average Household Size" (high-to-low or low-to-high is fine)

3.) In a new cell, display a dataframe containing only the 'Zipcode' and 'Median Age' series, sorted by 'Median Age' low-to-high. (Hint: ascending = True parameter...)

4.) In a new cell, display the above data frame but filter out all 'Median Age' values that are less than 1. (We don't want the '0' cases)

5.) Finally, in a new cell, show the Zip Code, Total Population, and Total Households for the top ten zip codes ranked by Total Population.

CSV FILE https://files.fm/u/v6y96f9g

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!