Answers for "pandas set column to value using mask"

0

pandas set column to value using mask

df['Event'] = np.where((df.Event == 'Painting'),'Art',df.Event)
df
Posted by: Guest on September-23-2021

Code answers related to "pandas set column to value using mask"

Python Answers by Framework

Browse Popular Code Answers by Language