Pandas isna() and isnull(), what is the difference?

Solution 1:

isnull is an alias for isna. Literally in the code source of pandas:

isnull = isna

Indeed:

>>> pd.isnull
<function isna at 0x7fb4c5cefc80>

So I would recommend using isna.

Solution 2:

The documentation for both is literally identical.

pandas.isna() : https://pandas.pydata.org/pandas-docs/stable/generated/pandas.isna.html#pandas.isna

pandas.isnull() : https://pandas.pydata.org/pandas-docs/stable/generated/pandas.isnull.html#pandas.isnull

In here, it even says DataFrame.isnull is an alias of isna in See also section.

pandas.DataFrame.isnull(): https://pandas-docs.github.io/pandas-docs-travis/generated/pandas.DataFrame.isnull.html#pandas.DataFrame.isnull

Therefore, they must be the same thing, like np.nan, np.NaN, np.NAN.