Question: In this assignment, you will work with a weather dataset. Let's start with loading the dataset. In [2]: import pandas as pd df = pd.read_csv(weather.csv')

In this assignment, you will work with a weather dataset. Let's start with loading the dataset.

In [2]: import pandas as pd df = pd.read_csv(weather.csv')

1. Examine the shape of the data frame In[ ]:

2. Check the top 5 rows to see what it looks like. In [ ]:

3. Exclude the first column (Unnamed) then display the top row. In[ ]:

4. Display Year, Month, Day, Hour, Dew Point, and Wind Speed for the records at row indexes 1000 to 1005. In[ ]:

5. Display all the records where Pressure is larger than 10,000 and Wind Speeds are smaller than 1. Inf[ ]:

6. Display the number of missing values in each column. Inf[ ]:

7. Display the records where Temprature is null.

8. Modify df to replace all the missing values in Temperature column with column mean. Then examine the number of missing values in each column to make sure that the missing values in other columns are not replaced by mean Temperature. In[ ]:

9. Modify df to replace all missing values in Dew Point and Pressure columns with column median. Then examine the number of missing values in each column to make sure the missing values in other columns are not replaced. At this point, there should be missing values left only in the last 2 columns. In[ ]:

10. Modify df to replace the remaining missing values with -9999, Then examine the number of missing values in each column to make sure there are no more missing values left. In[ ]:

11. Check out the top 10 rows of df to make sure it looks good. In[ ]:

12. The Station columns contain the year/station#. Update the column by dropping the year. Check out Vectorized String Operations in the book for more information. In[ ]

In this assignment, you will work with a weather:

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 General Management Questions!