switch pandas dataframe values where condition is true
>>> df = pd.DataFrame([[1, 25], [4, 40], [7, 45]],
index=['cobra', 'viper', 'sidewinder'],
columns=['max_speed', 'shield'])
>>> df
max_speed shield
cobra 1 25
viper 4 40
sidewinder 7 45
>>> df.loc[df['shield'] > 35] = 0
>>> df
max_speed shield
cobra 1 25
viper 4 0
sidewinder 7 0