mardi 2 avril 2019

replace value in column of dataframe with suitable values [duplicate]

I want to replace Value Nan in F1[id1] with 0 . Else F1[id1] = 1

code: it doesn't work. How can i solve it please F1.id1 = [0 if pd.isna(e) else 1 for e in F1.id1] Here the output ofF1

Aucun commentaire:

Enregistrer un commentaire