Skip to content

Instantly share code, notes, and snippets.

@makispl
Last active March 8, 2020 20:27
Show Gist options
  • Save makispl/e413c0946fc9f3ab894031819cd6ec84 to your computer and use it in GitHub Desktop.
Save makispl/e413c0946fc9f3ab894031819cd6ec84 to your computer and use it in GitHub Desktop.
# Take a sample from the Pop playlist
df_pop_sample_I = df_pop.sample(n=40, weights='danceability', random_state=1)
df_pop_sample_I.describe()
# Concatenate the original playlist with the sample
df_party_exp_I = pd.concat([df_party, df_pop_sample_I])
df_party_exp_I.describe()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment