Created
July 3, 2019 10:37
-
-
Save fclesio/2827f96e06ff9fb5f5350f217fdd0101 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
# Average songs per album | |
df_albuns = df_raw_lyrics.groupby(['artist', 'album']).size().reset_index() | |
df_albuns.columns = ['artist', 'album', 'qty_tracks'] | |
df_albuns.groupby(['artist']).agg({'qty_tracks': [np.size, np.mean]}).reset_index() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment