DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
8+7 =
Submit