Question: Assume that numpy has been import with the alias np . Consider the 5 by 7 array of maximum temperatures of five cities (Sydney, Melbourne,

 Assume that numpy has been import with the alias np .

Assume that numpy has been import with the alias np . Consider the 5 by 7 array of maximum temperatures of five cities (Sydney, Melbourne, Perth, Adelaide, Brisbane) in Australia: [[23.8, 24.9, 27. [30.5, 22.4, 28. [29.9, 28.4, 33. (3740 2370y 1505 " ~N NN - [np.nan , 32.5, 38. Use the array to create a dataframe 28.6, 27.4, 28.4, 30.8], 24,7, 24.e, 22.1, 19.4], 32.4, np.nan, 27.3, 32.8], 25.6, 26.8, 21.9, 20.5], 3, 28.9, 29.7, 30.2, 31.0]] df with the city name as the index (use the city names in the given order) and the days March 8, March 9, ... , March 14 as the columns. Your code has to handle missing values by not including them in any of the computations. Note that you have to include the non-missing values, for example, you cannot erase a column or row that contains a missing value. In separate code cells create from df : 1. A pandas series with the number of days with maximum temperature greater than 25 degrees for each city. 2. A pandas series with the average of the temperatures of the last three days for each city. 3. A pandas series with the maximum of the recorded temperatures for each day, across the cities. 4. Add a new row to df with the minimum of the recorded temperatures for each day, across the cities. Label the index for this row as 'min across cities'

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 Programming Questions!