Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to change value of categorical variable in python

df['Gender'].str[0].str.upper().map({'M':'Male', 'F':'Female'})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #change #categorical #variable #python
ADD COMMENT
Topic
Name
8+7 =