I have a dataframe.
df = ...
gb = df.groupby(['A','B','C'],axis=0)
new_df = gb.agg(['sum','max'])
def func(expected_list: List[str]):
...
# fails if a list of strings is not passed
func(list(new_df.columns))
And things fail.
new_df.columns yields: [ ('A','max'), ('A','sum'), ('B','max'), ... ]
How does one convert an aggregate groupby call to a dataframe that returns a columns Series with a call to columns, as expected, rather than this tuple-quasi-tensor?