lundi 23 août 2021

Pandas data frame if statement [duplicate]

I have a code

for col in range (2,51):
    if df.iloc[col] > 60:
        df1.iloc[col] = 0
df1

It throws up an error that truth value of series is ambiguous. How do I solve this?

Aucun commentaire:

Enregistrer un commentaire