Search
 
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
Name
7+2 =