Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How to convert Gender to numeric variable

## Converting Gender to numeric variable(by using target ordinary encodiing)

df['Gender']=df['Gender'].map({'F':0, 'M':1})
df.head()
 
PREVIOUS NEXT
Tagged: #How #convert #Gender #numeric #variable
ADD COMMENT
Topic
Name
7+9 =