Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
164 B
4
Indexable
Never
le = LabelEncoder()
df_ohe = pd.get_dummies(df,columns=['Gender'],drop_first=True)
df_ohe['Geography']=le.fit_transform(df_ohe['Geography'])
display(df_ohe.head(3))
Leave a Comment