I want to Categorize float variable which has letters as its elements.
Elements:
Horse, Camel, Car, Truck, Walk, Bus, Donkey.
I now want to categorize them into 1 for Animal. 0 for Non-animal.
I've tried to create a new variable
Mode_of_transport = 0
replace Mode_of_transport=1 if old_variable=="Horse"|old_variable=="Donkey"
It's giving me "mismatch"
any suggestions?
0 Response to How to Categorize float variable
Post a Comment