DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
pandas set column to value using mask
df['Event'] = np.where((df.Event == 'Painting'),'Art',df.Event) df
Source by kanoki.org #
PREVIOUS
NEXT
Tagged:
#pandas
#set
#column
#mask
ADD COMMENT
Topic
COMMENT
Name
2+8 =
Submit