---
source: https://iinventedlight.com/library/notes/pandas-missing-data.md
title: "Missing data in pandas: NaN, None and NA"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "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); prose restates or closely paraphrases cited source lines"
license_family: pandas-bsd3
rule_check: "needs rule check (family not in auto-publish rule; check.mjs auto-approves only usgov and arxiv-ccby)"
attribution: "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)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-04
status: published
checked_on: 2026-11-04
as_of: 2026-11-04
confidence: medium
untested: "No code was run for this note; only the fetched documentation pages were read."
category: coding-references
topic_area: "code-ai-eng: pandas"
tags: ['pandas', 'missing-data', 'na']
sources:
  - id: S1
    title: "Working with missing data — pandas 3.1.1 documentation"
    publisher: pandas docs
    url: https://pandas.pydata.org/docs/user_guide/missing_data.html
    accessed: 2026-11-04
    license: "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)"
  - id: S2
    title: "10 minutes to pandas — pandas 3.1.1 documentation"
    publisher: pandas docs
    url: https://pandas.pydata.org/docs/user_guide/10min.html
    accessed: 2026-11-04
    license: "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)"
---
# 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

- The disadvantage of using NumPy data types is that the original data type will be coerced to np.float64 or object. (S1)
- The nullable types maintain the original data type of the data. (S1)
- NA is a scalar (singleton) used to represent missing values for nullable dtypes. (S1)
- Currently, pandas does not use those data types using NA by default in a DataFrame or Series, so you need to specify the dtype explicitly. (S1)
- NA comparisons deviate from the behaviour of np.nan, where comparisons with np.nan always return False. (S1)

## Where NaN appears

- In arithmetic, pandas automatically broadcasts along the specified dimension and will fill unaligned labels with np.nan. (S2)

## Claims
- id: C1
  claim: pandas uses different missing-value sentinels by dtype.
  source: S1
  evidence: "pandas uses different sentinel values to represent a missing"
- id: C2
  claim: Use isna() or notna() to detect missing values.
  source: S1
  evidence: "To detect these missing value, use the isna() or notna() methods."
- id: C3
  claim: NA is a singleton for nullable dtypes.
  source: S1
  evidence: "NA is a scalar (singleton) used to represent missing values for"
- id: C4
  claim: Unaligned labels are filled with np.nan.
  source: S2
  evidence: "automatically broadcasts along the specified dimension and will fill unaligned labels with np.nan."

## Sources
- [S1] Working with missing data — pandas 3.1.1 documentation. pandas docs. https://pandas.pydata.org/docs/user_guide/missing_data.html . License: 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). Accessed 2026-11-04.
- [S2] 10 minutes to pandas — pandas 3.1.1 documentation. pandas docs. https://pandas.pydata.org/docs/user_guide/10min.html . License: 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). Accessed 2026-11-04.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted).
