Open obtim opened 2 years ago
It could be that we are using different versions of pandas. Maybe instead of rename_axis
you could change this line to:
grouped_win_rate_when_player1 = match_data.groupby('Player1ID')['WIN'].agg(['mean', 'count']).reset_index().rename(columns={'Player1ID': 'PlayerID'})
grouped_win_rate_when_player2 = match_data.groupby('Player2ID')['WIN'].agg(['mean', 'count']).reset_index().rename(columns={'Player2ID': 'PlayerID'})
I think this should work too.
Don't work :(
**--------------------------------------------------------------------------- KeyError Traceback (most recent call last)
Use Anaconda3-2021.05-Windows-x86_64 on Win 7 x64 1. Fetch data with snooker.org API.ipynb - works fine in 2. Exploratory Data Analysis.ipynb got error: **TypeError Traceback (most recent call last)