Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
429 B
9
Indexable
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)