Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
429 B
8
Indexable
Never
sorted_logs_new = logs_new.sort_values(by='device_id', ascending=False)
event_funnel_by_group = sorted_logs_new.pivot_table(index='event_name', 
                                             columns='group',
                                             values='device_id', 
                                             aggfunc=pd.Series.nunique)\
                                .reset_index()
display(event_funnel_by_group)