← All notes

Missing data in pandas: NaN, None and NA

Answer: pandas uses different sentinel values to represent a missing (also referred to as NA) value depending on the data type. To detect these missing values, use the isna() or notna() methods, which will also consider None a missing value. (S1)

Sentinels and dtypes

Where NaN appears

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted).

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: pandas docs, Working with missing data — pandas 3.1.1 documentation, BSD-3-Clause (pandas-dev/pandas LICENSE; Copyright (c) 2008-2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team; Copyright (c) 2011-2026, Open source contributors; https://github.com/pandas-dev/pandas/blob/main/LICENSE); pandas docs, 10 minutes to pandas — pandas 3.1.1 documentation, BSD-3-Clause (pandas-dev/pandas LICENSE; Copyright (c) 2008-2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team; Copyright (c) 2011-2026, Open source contributors; https://github.com/pandas-dev/pandas/blob/main/LICENSE).

Cite this

Permanent ID: iil:note:a5xt5929

iinventedlight. 2026. "Missing data in pandas: NaN, None and NA." iinventedlight Library, iil:note:a5xt5929, version of 2026-11-04. https://iinventedlight.com/library/notes/pandas-missing-data/. License: CC-BY-4.0.

@misc{iil_note_a5xt5929,
  author = {{iinventedlight}},
  title = {{Missing data in pandas: NaN, None and NA}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-04},
  url = {https://iinventedlight.com/library/notes/pandas-missing-data/},
  note = {Permanent ID iil:note:a5xt5929. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

For language models and agents: start at /llms.txt. This page in Markdown: /library/notes/pandas-missing-data.md.