Dealing with different names
It might be useful to see average temperatures for each season type - pre, regular, and post. You get good news and (sort of) bad news from the weather team…They found data for both the 2016 and 2017 seasons. However, it looks like they changed their naming convention since you got the last file. You'll need to adjust your code before producing temperatures.
The games_places data frame is loaded along with a new weather data frame, weather_new.
Este ejercicio forma parte del curso
Pandas Joins for Spreadsheet Users
Instrucciones del ejercicio
- View the first 5 rows of
games_placesand the first 5 rows ofweather_new. - Join the data to include only games contained in both datasets.
- View the average temperatures by season type.
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# View the first 5 rows of each data frame
print(____)
print(____)
# Join data frames
games_weather = games_places.____(____, left_on=____,
right_on=____, how=____)
# View average temperatures
print(games_weather.pivot_table(values='Temperature', index='SeasonType'))