Skip to content

Instantly share code, notes, and snippets.

@khurchla
Created June 7, 2022 02:24
Show Gist options
  • Save khurchla/4420263589e52e57df2d316357fc2828 to your computer and use it in GitHub Desktop.
Save khurchla/4420263589e52e57df2d316357fc2828 to your computer and use it in GitHub Desktop.
# add some missing values to a feature to see how they
ixs = wine.iloc[100:110].index
wine.loc[ixs,'citric acid'] = None
bins = (2, 6.5, 8)
group_names = ['bad', 'good']
wine_reference['quality'] = pd.cut(wine_reference['quality'], bins = bins, labels = group_names)
wine_target['quality'] = pd.cut(wine_target['quality'], bins = bins, labels = group_names)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment