DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python change all values in column
df.replace({'column_name':{'A':0,'B':1},'Sex':{'m':0,'f':1}}, inplace=True)
Source by pandas.pydata.org #
PREVIOUS
NEXT
Tagged:
#python
#change
#values
#column
ADD COMMENT
Topic
COMMENT
Name
2+6 =
Submit