Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created October 1, 2020 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/0e4c9d14be4c9b8bb9c498372a5c652f to your computer and use it in GitHub Desktop.
Save amankharwal/0e4c9d14be4c9b8bb9c498372a5c652f to your computer and use it in GitHub Desktop.
# Donald Trump
np.random.seed(10)
remove_n =324
drop_indices = np.random.choice(trump_reviews.index, remove_n, replace=False)
df_subset_trump = trump_reviews.drop(drop_indices)
print(df_subset_trump.shape)
# Joe Biden
np.random.seed(10)
remove_n =31
drop_indices = np.random.choice(biden_reviews.index, remove_n, replace=False)
df_subset_biden = biden_reviews.drop(drop_indices)
print(df_subset_biden.shape)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment