samedi 7 mars 2020

Why are the following 2 loop If loop structures different on Python?

So I wanted to look through a dataframe on Python, and replace NaN values in a specific column. What i would like to understand however is what is the difference between these 2?

if pd.isnull(coly):

if coly == np.NaN:

The first statement works, the second one doesnt even generate an error.

Aucun commentaire:

Enregistrer un commentaire