I have a problem with a graph. this is the code:
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv('https://raw.githubusercontent.com/verticale3185/FINEL-PROJECT/main/cristiano_vs_messi.csv')
df.date = pd.to_datetime(df.date)
df['year'] = pd.DatetimeIndex(df['date']).year
df['year'].fillna(method = 'ffill', inplace = True)
df['year'] = df['year'].astype(int)
messi_df = df.loc[df.player == 'messi'].reset_index()
ronaldo_df = df.loc[df.player == 'ronaldo']
plt.suptitle('Goals Per Year For Fvery Player')
ronaldo_df.groupby(['year'])['player'].count().astype(int).plot(kind='bar',color='brown',label='Ronaldo',figsize=(15,5),width = 0.4)
messi_df.groupby(['year'])['player'].count().astype(int).plot(kind='bar',color='#14D622',label='Messi',figsize=(15,5),width = 0.2)
Now on this graph I want to add a line about the mean of every player. for example, if the mean of messi`s goals is 32 goals for year, i want one line in the same color that show this.