For the past few hours, I've been trying to change/rename the name of my multiindex in my pandas Series but I do not know how to achieve it. I've been looking all kind of different things and I cannot seem to get it right. This is important because I have realized that if I do not do so, my two indexes have the same name (which is "date"). Here is the code:
df_bar = df.groupby([pd.Grouper(freq = "Y"), pd.Grouper(freq = "M")])["value"].mean()
if you print df_bar, you would have the following: print of df_bar
Would it be possible to name each index directly in the groupby()?
Thank you in advance for the help :)