sex_num={‘male’:1, ‘female’:0}
#clean_data[‘Sex’].size
for i in range(clean_data[‘Sex’].size):
clean_data[‘Sex’][i]=sex_num[clean_data[‘Sex’][i]]
COnverting male to 1 and female to 0 in dataframe
Hey @chiragwxN, I Just cleared your doubt over Whatsapp.
Hope it is resolved. Plz close the doubt in my doubts section.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.