I am getting this error when I try to add a column to my pandas dataset based on the following conditions.
df['name'] = (1 if (df['name2'] > 0) and (df['name3'] == 0) else 0)
I would really appreciate some help with this, I am very new to python.
Thanks.
Aucun commentaire:
Enregistrer un commentaire