Pandas Filtre et Valeur de modification

df.loc[df['dollars_spent'] > 0, 'purchase'] = 1
Cerbrain