Machine Learning, Deep Learning, AI, Pandas, Data Analysis.
groups all the games with the same Wteam number and finds where how many times that specific team won at home, on the road, or at a neutral site. df.groupby('Wteam')['Wscore'].mean().head() Out: Wteam 1101 78.111111 1102 69.893204 1103 75.839768 1104 75.825944 1105 74.960894 Name: Wscore, dtype: