I use the pd.pivot_table() method to create a user-item matrix by pivoting the user-item activity data. However, the dataframe is so large that I got compla
Some Solutions:
df.groupby('EVENT_ID')['DIAGNOSIS'].apply(list).to_dict()