---
source: https://iinventedlight.com/library/notes/pandas-data-structures.md
title: "pandas Series and DataFrame"
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, Package overview — 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, Intro to data structures — 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', 'series', 'dataframe']
sources:
  - id: S1
    title: "Package overview — pandas 3.1.1 documentation"
    publisher: pandas docs
    url: https://pandas.pydata.org/docs/getting_started/overview.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: "Intro to data structures — pandas 3.1.1 documentation"
    publisher: pandas docs
    url: https://pandas.pydata.org/docs/user_guide/dsintro.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)"
---
# pandas Series and DataFrame

**Answer:** The two primary data structures of pandas, Series (1-dimensional) and DataFrame (2-dimensional), handle the vast majority of typical use cases. pandas is built on top of NumPy and is intended to integrate well within a scientific computing environment with many other 3rd party libraries. (S1)

## How they relate

- DataFrame is a container for Series, and Series is a container for scalars. (S1)
- The length of a Series cannot be changed, but, for example, columns can be inserted into a DataFrame. (S1)

## Labels and alignment

- The fundamental behavior about data types, indexing, axis labeling, and alignment apply across all of the objects. (S2)
- The axis labels are collectively referred to as the index. (S2)
- The link between labels and data will not be broken unless done so explicitly by you. (S2)

## Series and NumPy

- Series acts very similarly to a numpy.ndarray and is a valid argument to most NumPy functions. (S2)
- Like a NumPy array, a pandas Series has a single dtype. (S2)
- If you need the actual array backing a Series, use Series.array. (S2)

## Claims
- id: C1
  claim: Series is 1-dimensional and DataFrame 2-dimensional.
  source: S1
  evidence: "and DataFrame (2-dimensional), handle the vast majority of typical use"
- id: C2
  claim: DataFrame is a container for Series.
  source: S1
  evidence: "for Series, and Series is a container for scalars."
- id: C3
  claim: The axis labels are called the index.
  source: S2
  evidence: "labels are collectively referred to as the index."
- id: C4
  claim: A Series has a single dtype.
  source: S2
  evidence: "Like a NumPy array, a pandas Series has a single dtype."

## Sources
- [S1] Package overview — pandas 3.1.1 documentation. pandas docs. https://pandas.pydata.org/docs/getting_started/overview.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] Intro to data structures — pandas 3.1.1 documentation. pandas docs. https://pandas.pydata.org/docs/user_guide/dsintro.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).
