In the following code I want to export some columns in an excel file but I can't export the columns that are inside groupby, how can I do it.
import pandas as pd
df = pd.read_excel('ETATS_LOGS.xlsx',sheet_name = 'R9_17112020')
df1 = df.groupby(['webApp','mw'])['chgtCh','accessRecordModule','playerPlay startOver','playerPlay PdL','playerPlay PVR','contentHasAds','pdlComplete','lirePdl','lireVod'].sum()
print(df1)
df1.to_excel(r'logs.xlsx', index = False)