Created
August 6, 2018 11:30
-
-
Save trungkak/72889e11191923c41df91f223239df39 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Adding a 'count' column to the result of a groupby in pandas? (https://goo.gl/WMr1zJ) | |
df.groupby(['A','B']).size().to_frame('count').reset_index() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment