I have been trying to use an if statement for a pandas dataset, but I keep getting this error: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
My code:
if (df['Year'] == 2013): print(df['Name'])
Aucun commentaire:
Enregistrer un commentaire