Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Converting categorical variable to numeric variable in python

## Converting Age to numeric variable

df['Gender']=pd.get_dummies(df['Gender'],drop_first=1)
df.head()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Converting #categorical #variable #numeric #variable #python
ADD COMMENT
Topic
Name
2+5 =