I need to set the value of one column based on the value of another in a Pandas dataframe. This is the logic:
if df[\'c1\'] == \'Value\': df[\'c2\'] = 10
Try out df.apply() if you've a small/medium dataframe,
df['c2'] = df.apply(lambda x: 10 if x['c1'] == 'Value' else x['c1'], axis = 1)
Else, follow the slicing techniques mentioned in the above comments if you've got a big dataframe.