Created
January 23, 2024 05:52
-
-
Save wibowotangara/38945bc02e669ad26011aac30d8964ce 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
categorical_cols = [col for col in df.select_dtypes(include='object').columns.tolist()] | |
onehot = pd.get_dummies(df[categorical_cols], drop_first=True) | |
onehot = onehot.drop(columns=['loan_label_good']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment