Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
python imbalanced data machine learning classification
df['Class'] = df['Class'].map(lambda x: 0 if x == 'negative' else 1)
df = pd.get_dummies(df, columns=['Sex'], drop_first=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment