Answers for "convert numeric column to categorical in python"

1

panda categorical data into numerica

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

Code answers related to "convert numeric column to categorical in python"

Browse Popular Code Answers by Language