ComeçarComece de graça

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 exercício faz parte do curso

Pandas Joins for Spreadsheet Users

Ver curso

Instruções do exercício

  • View the first 5 rows of games_places and the first 5 rows of weather_new.
  • Join the data to include only games contained in both datasets.
  • View the average temperatures by season type.

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# 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'))
Editar e executar o código