This question already has an answer here:
I want to replace Value Nan in F1[id1] with 0 . Else F1[id1] = 1
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
F1.id1 = [0 if pd.isna(e) else 1 for e in F1.id1]
Aucun commentaire:
Enregistrer un commentaire