# pandas-dev/pandas architecture

> Architecture diagram of the GitHub repository pandas-dev/pandas, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pandas-dev/pandas
- Repository: https://github.com/pandas-dev/pandas
- Video tour (about a minute): https://gitdiagram.com/pandas-dev/pandas/video

## Overview

pandas is a labeled-data analysis toolkit. A typical workflow starts with an analyst calling the public API, optionally reading tabular data, constructing DataFrame or Series objects, then aligning, indexing, transforming, grouping, windowing, or evaluating expressions before returning labeled results. The tree also documents broad file/database I/O, time-series support, plotting, missing-data handling, reshaping, and interchange. The graph emphasizes sampled runtime modules; several capability nodes have limited wiring because their implementations were not sampled.

Main entry points: [`pandas/core/frame.py`](https://github.com/pandas-dev/pandas/blob/main/pandas/core/frame.py) (DataFrame), [`pandas/io/api.py`](https://github.com/pandas-dev/pandas/blob/main/pandas/io/api.py) (I/O API), [`pandas/core/series.py`](https://github.com/pandas-dev/pandas/blob/main/pandas/core/series.py) (Series), [`pandas/core/api.py`](https://github.com/pandas-dev/pandas/blob/main/pandas/core/api.py) (Public API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public API"]
  node_api["Public API<br/>[api.py]"]
  node_io_api["I/O API<br/>[api.py]"]
end

subgraph group_model["Data Model"]
  node_frame["DataFrame<br/>[frame.py]"]
  node_series["Series<br/>[series.py]"]
  node_generic["NDFrame Base<br/>[generic.py]"]
  node_indexes["Labeled Indexes<br/>[base.py]"]
  node_internals["Block Storage<br/>[managers.py]"]
  node_dtypes["Dtype Inference<br/>[inference.py]"]
end

subgraph group_compute["Computation"]
  node_ops["Alignment Ops<br/>[dispatch.py]"]
  node_computation["Expression API<br/>[api.py]"]
  node_engines["Expression Engines<br/>[engines.py]"]
end

subgraph group_io["Data I/O"]
  node_readers["Reader Dispatch<br/>[readers.py]"]
  node_python_parser["Python Parser<br/>[python_parser.py]"]
  node_csv_native["Native Parser<br/>[pd_parser.c]"]
  node_excel["Excel I/O<br/>[_base.py]"]
  node_sql["SQL I/O<br/>[sql.py]"]
  node_pytables["HDF5 I/O<br/>[pytables.py]"]
end

subgraph group_special["Specialized Analysis"]
  node_indexing["Indexing<br/>[indexing.py]"]
  node_groupby["GroupBy Analysis<br/>[groupby.py]"]
  node_reshape["Reshape Operations<br/>[api.py]"]
  node_windows["Window Statistics<br/>[rolling.py]"]
  node_timeseries["Time Series<br/>[datetimes.py]"]
  node_plotting["Plotting<br/>[_core.py]"]
end

node_analyst(("Analyst"))
node_numexpr["NumExpr"]
node_hdf5[("HDF5 Store")]

node_analyst -->|"invokes"| node_api
node_api -->|"constructs"| node_frame
node_api -->|"constructs"| node_series
node_api -->|"dispatches"| node_io_api
node_io_api -->|"dispatches"| node_readers
node_readers -->|"parses"| node_python_parser
node_python_parser -->|"returns"| node_frame
node_frame -->|"inherits"| node_generic
node_series -->|"inherits"| node_generic
node_frame -->|"stores"| node_internals
node_series -->|"stores"| node_internals
node_frame -->|"uses"| node_indexes
node_series -->|"uses"| node_indexes
node_internals -->|"infers"| node_dtypes
node_frame -->|"dispatches"| node_ops
node_series -->|"dispatches"| node_ops
node_computation -->|"evaluates"| node_engines
node_engines -.->|"evaluates"| node_numexpr
node_frame -->|"indexes"| node_indexing
node_frame -->|"groups"| node_groupby
node_frame -->|"reshapes"| node_reshape
node_frame -->|"windows"| node_windows
node_frame -->|"dates"| node_timeseries
node_frame -.->|"plots"| node_plotting
node_io_api -->|"dispatches"| node_excel
node_io_api -->|"dispatches"| node_sql
node_io_api -->|"dispatches"| node_pytables
node_pytables -->|"reads/writes"| node_hdf5

click node_api "https://github.com/pandas-dev/pandas/blob/main/pandas/core/api.py"
click node_io_api "https://github.com/pandas-dev/pandas/blob/main/pandas/io/api.py"
click node_frame "https://github.com/pandas-dev/pandas/blob/main/pandas/core/frame.py"
click node_series "https://github.com/pandas-dev/pandas/blob/main/pandas/core/series.py"
click node_generic "https://github.com/pandas-dev/pandas/blob/main/pandas/core/generic.py"
click node_indexes "https://github.com/pandas-dev/pandas/blob/main/pandas/core/indexes/base.py"
click node_internals "https://github.com/pandas-dev/pandas/blob/main/pandas/core/internals/managers.py"
click node_dtypes "https://github.com/pandas-dev/pandas/blob/main/pandas/core/dtypes/inference.py"
click node_ops "https://github.com/pandas-dev/pandas/blob/main/pandas/core/ops/dispatch.py"
click node_computation "https://github.com/pandas-dev/pandas/blob/main/pandas/core/computation/api.py"
click node_engines "https://github.com/pandas-dev/pandas/blob/main/pandas/core/computation/engines.py"
click node_readers "https://github.com/pandas-dev/pandas/blob/main/pandas/io/parsers/readers.py"
click node_python_parser "https://github.com/pandas-dev/pandas/blob/main/pandas/io/parsers/python_parser.py"
click node_csv_native "https://github.com/pandas-dev/pandas/blob/main/pandas/_libs/src/parser/pd_parser.c"
click node_excel "https://github.com/pandas-dev/pandas/blob/main/pandas/io/excel/_base.py"
click node_sql "https://github.com/pandas-dev/pandas/blob/main/pandas/io/sql.py"
click node_pytables "https://github.com/pandas-dev/pandas/blob/main/pandas/io/pytables.py"
click node_indexing "https://github.com/pandas-dev/pandas/blob/main/pandas/core/indexing.py"
click node_groupby "https://github.com/pandas-dev/pandas/blob/main/pandas/core/groupby/groupby.py"
click node_reshape "https://github.com/pandas-dev/pandas/blob/main/pandas/core/reshape/api.py"
click node_windows "https://github.com/pandas-dev/pandas/blob/main/pandas/core/window/rolling.py"
click node_timeseries "https://github.com/pandas-dev/pandas/blob/main/pandas/core/tools/datetimes.py"
click node_plotting "https://github.com/pandas-dev/pandas/blob/main/pandas/plotting/_core.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_api,node_io_api toneBlue
class node_frame,node_series,node_generic,node_indexes,node_internals,node_dtypes,node_hdf5 toneAmber
class node_ops,node_computation,node_engines toneMint
class node_readers,node_python_parser,node_csv_native,node_excel,node_sql,node_pytables toneRose
class node_indexing,node_groupby,node_reshape,node_windows,node_timeseries,node_plotting,node_analyst,node_numexpr toneIndigo
```

## Components

### Public API

- [Public API](https://github.com/pandas-dev/pandas/blob/main/pandas/core/api.py): `pandas/core/api.py`
- [I/O API](https://github.com/pandas-dev/pandas/blob/main/pandas/io/api.py): `pandas/io/api.py`

### Data Model

- [DataFrame](https://github.com/pandas-dev/pandas/blob/main/pandas/core/frame.py): `pandas/core/frame.py`
- [Series](https://github.com/pandas-dev/pandas/blob/main/pandas/core/series.py): `pandas/core/series.py`
- [NDFrame Base](https://github.com/pandas-dev/pandas/blob/main/pandas/core/generic.py): `pandas/core/generic.py`
- [Labeled Indexes](https://github.com/pandas-dev/pandas/blob/main/pandas/core/indexes/base.py): `pandas/core/indexes/base.py`
- [Block Storage](https://github.com/pandas-dev/pandas/blob/main/pandas/core/internals/managers.py): `pandas/core/internals/managers.py`
- [Dtype Inference](https://github.com/pandas-dev/pandas/blob/main/pandas/core/dtypes/inference.py): `pandas/core/dtypes/inference.py`

### Computation

- [Alignment Ops](https://github.com/pandas-dev/pandas/blob/main/pandas/core/ops/dispatch.py): `pandas/core/ops/dispatch.py`
- [Expression API](https://github.com/pandas-dev/pandas/blob/main/pandas/core/computation/api.py): `pandas/core/computation/api.py`
- [Expression Engines](https://github.com/pandas-dev/pandas/blob/main/pandas/core/computation/engines.py): `pandas/core/computation/engines.py`

### Data I/O

- [Reader Dispatch](https://github.com/pandas-dev/pandas/blob/main/pandas/io/parsers/readers.py): `pandas/io/parsers/readers.py`
- [Python Parser](https://github.com/pandas-dev/pandas/blob/main/pandas/io/parsers/python_parser.py): `pandas/io/parsers/python_parser.py`
- [Native Parser](https://github.com/pandas-dev/pandas/blob/main/pandas/_libs/src/parser/pd_parser.c): `pandas/_libs/src/parser/pd_parser.c`
- [Excel I/O](https://github.com/pandas-dev/pandas/blob/main/pandas/io/excel/_base.py): `pandas/io/excel/_base.py`
- [SQL I/O](https://github.com/pandas-dev/pandas/blob/main/pandas/io/sql.py): `pandas/io/sql.py`
- [HDF5 I/O](https://github.com/pandas-dev/pandas/blob/main/pandas/io/pytables.py): `pandas/io/pytables.py`

### Specialized Analysis

- [Indexing](https://github.com/pandas-dev/pandas/blob/main/pandas/core/indexing.py): `pandas/core/indexing.py`
- [GroupBy Analysis](https://github.com/pandas-dev/pandas/blob/main/pandas/core/groupby/groupby.py): `pandas/core/groupby/groupby.py`
- [Reshape Operations](https://github.com/pandas-dev/pandas/blob/main/pandas/core/reshape/api.py): `pandas/core/reshape/api.py`
- [Window Statistics](https://github.com/pandas-dev/pandas/blob/main/pandas/core/window/rolling.py): `pandas/core/window/rolling.py`
- [Time Series](https://github.com/pandas-dev/pandas/blob/main/pandas/core/tools/datetimes.py): `pandas/core/tools/datetimes.py`
- [Plotting](https://github.com/pandas-dev/pandas/blob/main/pandas/plotting/_core.py): `pandas/plotting/_core.py`

### Other components

- **Analyst**
- **NumExpr**
- **HDF5 Store**

## Connections

- Analyst → Public API: invokes
- Public API → DataFrame: constructs
- Public API → Series: constructs
- Public API → I/O API: dispatches
- I/O API → Reader Dispatch: dispatches
- Reader Dispatch → Python Parser: parses
- Python Parser → DataFrame: returns
- DataFrame → NDFrame Base: inherits
- Series → NDFrame Base: inherits
- DataFrame → Block Storage: stores
- Series → Block Storage: stores
- DataFrame → Labeled Indexes: uses
- Series → Labeled Indexes: uses
- Block Storage → Dtype Inference: infers
- DataFrame → Alignment Ops: dispatches
- Series → Alignment Ops: dispatches
- Expression API → Expression Engines: evaluates
- Expression Engines → NumExpr: evaluates
- DataFrame → Indexing: indexes
- DataFrame → GroupBy Analysis: groups
- DataFrame → Reshape Operations: reshapes
- DataFrame → Window Statistics: windows
- DataFrame → Time Series: dates
- DataFrame → Plotting: plots
- I/O API → Excel I/O: dispatches
- I/O API → SQL I/O: dispatches
- I/O API → HDF5 I/O: dispatches
- HDF5 I/O → HDF5 Store: reads/writes
