text_plain_output_1.png
FEATURES = [c for c in train_df.columns if not c in ['level_group']]
ALL_USERS = train_df.index.unique()

train_level_df = train_df.pivot_table(columns='level_group', values=[x for x in train_df.columns if not x == 'level_group'], index='session_id', aggfunc='sum', fill_value=0)
display(train_level_df)