Answers for "pandas change data type to categorical"

1

panda categorical data into numerica

sex = train_dataset['Sex'].replace(['female','male'],[0,1])
print(sex)
Posted by: Guest on March-04-2021
0

Pandas categorical dtypes

nominal_attr = df.select_dtypes(include='category').columns
Posted by: Guest on December-09-2021

Code answers related to "pandas change data type to categorical"

Browse Popular Code Answers by Language