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 pbpython.com #
 
PREVIOUS NEXT
Tagged: #Converting #categorical #variable #numeric #variable #python
ADD COMMENT
Topic
Name
9+6 =