Skip to content

Instantly share code, notes, and snippets.

@tanpengshi
Created November 16, 2020 12:17
Show Gist options
  • Save tanpengshi/f2f505b133d9c0ac374fb34f5eada682 to your computer and use it in GitHub Desktop.
Save tanpengshi/f2f505b133d9c0ac374fb34f5eada682 to your computer and use it in GitHub Desktop.
X_train_matrix = pd.pivot_table(X_train,values='user_score',index='user_id',columns='product_id')
X_train_matrix = X_train_matrix.fillna(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment