Created
January 30, 2021 13:53
-
-
Save grahamharrison68/d4c7990ba6015ac6b25af4557e3d6037 to your computer and use it in GitHub Desktop.
This file contains 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
red_wines = df_merged_wine[df_merged_wine['label'] == 1] | |
all_white_wines = df_merged_wine[df_merged_wine['label'] == 0] | |
white_wines = all_white_wines.sample(n=red_wines.shape[0], random_state=24) | |
df_wine_balanced = pd.concat([red_wines, white_wines]) | |
df_wine_balanced |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment