5. Return the mean temperature for each day in Miami.

s.loc['Miami]

'''Output:

day

2017-01-01 90

2017-01-02 85

2017-01-03 87

2017-01-04 92

Name: temperature, dtype: int64

'''

6. Using the DataFrame s above, get the temperature of Miami in 2017–01–01.

s.loc['Miami', '2017-01-01']

'''Output is 90.'''

7. Make a table of average temperature and a median temperature of each city.

df.groupby('city')['temperature'].agg({'avg_temp': np.average, 'median_temp': np.median}