pandas
|
This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production. |
pandas is the Python library for labelled, tabular and time-series data. This sub-section of the Data Science section explains pandas from installation to large-data techniques, with runnable examples and a link to the official documentation page each example derives from. It is written against pandas 3.1 with NumPy 2.5, and the versions, behaviour and links were checked in October 2026. Examples target Python 3.13 or 3.14 and were run on Python 3.13; pandas 3.1 itself needs Python 3.11 or later. The pandas entries of the Data Science cheat sheet give the shortest summary of the same material.
Version baseline
| Item | Baseline |
|---|---|
pandas |
3.1 (the 3.x series made copy-on-write and the dedicated string dtype the defaults) |
Python |
3.13 or 3.14 (examples run on 3.13; pandas 3.1 needs 3.11 or later) |
NumPy |
2.5 |
Checked |
October 2026 |
Older books and tutorials describe pandas 0.x, 1.x and 2.x behaviour. Where it differs from 3.x, the pages say so in prose with versions and dates. The migration summary is on What’s New in 3.x and Migrating.
Concept-to-page map
Getting started
| Concept | Page |
|---|---|
Installing pandas, version numbers and release policy |
|
A first tour of the library |
|
Differences between 2.x and 3.x, upgrade steps |
|
Display, precision and behaviour options |
|
Frequent questions and surprising behaviour |
Core data structures
| Concept | Page |
|---|---|
One-dimensional labelled arrays |
|
Two-dimensional labelled tables |
|
Labels, axes and index types |
|
Hierarchical labels |
|
Arithmetic, descriptive statistics, sorting and other everyday operations |
|
Duplicate labels and duplicate rows |
Selecting and transforming
| Concept | Page |
|---|---|
Label, position and boolean selection |
|
Column expressions, selecting and filtering |
|
Applying your own functions |
|
Split-apply-combine aggregation |
|
Rolling, expanding and exponentially weighted windows |
|
Styled tables for reports |
|
Plotting straight from a DataFrame |
Combining and reshaping
| Concept | Page |
|---|---|
Stacking tables along an axis |
|
Database-style joins |
|
Long and wide layouts, cross-tabulation |
|
Unpivoting, stacking and exploding list-like cells |
Data types
| Concept | Page |
|---|---|
Which dtypes exist and how they are chosen |
|
Missing values and how each dtype represents them |
|
Integer, float and boolean dtypes that hold missing values |
|
The default string dtype and the |
|
Fixed sets of labels |
|
Arrow-backed columns |
|
Mostly-empty data |
|
Copy and view semantics |
Time series
| Concept | Page |
|---|---|
Timestamps, periods, time zones and date ranges |
|
Durations and differences between timestamps |
|
Changing frequency, downsampling and upsampling |
Reading and writing data
| Format | Page |
|---|---|
CSV and delimited text |
|
Excel workbooks |
|
JSON, HTML tables and XML |
|
Parquet, Feather, ORC and Iceberg |
|
Relational databases through SQLAlchemy |
|
HDF5 and pickle |
|
Stata, SAS and SPSS files |
Performance and scale
| Concept | Page |
|---|---|
Vectorisation, |
|
Memory, chunking and alternatives for data larger than RAM |
Suggested learning path
-
Install a supported environment with Installing pandas and Understanding Its Versions, then follow 10 Minutes to pandas.
-
Learn the structures: Series, DataFrame and Index Objects.
-
Practise selection with Indexing and Selecting and the semantics in Copy-on-Write.
-
Load real data through the input and output pages, starting with CSV & Text Files.
-
Clean it with Missing Data in pandas, Duplicate Labels and Rows in pandas and Text Data & the str Dtype in pandas.
-
Summarise and reshape with Group By: Split-Apply-Combine, Merge & Join in pandas and Pivot & Pivot Tables in pandas.
-
Add time with Time Series and Dates and Resampling and Frequencies.
-
Scale up with Enhancing Performance and Scaling to Large Datasets.
Related material on this site
-
Data Science — the section overview.
-
Cheat sheet, pandas entries — one-line reminders.
pandas sources
-
Release notes (v2.0.0 to v3.1.0)
-
Roadmap and PDEPs (PDEP-6, 7, 10, 14 and 17)
Bibliography
All official links below were opened on 2026-10-30.
Official documentation
-
pandas: release notes, installation, policies, migration guides, user guide and roadmap and PDEPs.
-
Scientific Python: home page and SPEC 0, minimum supported dependencies.
-
NumPy: manual and 2.0 migration guide.
-
Python Packaging User Guide: installing packages; Python venv.
-
uv: documentation. conda-forge: download. Miniforge: repository.
-
Matplotlib: documentation. seaborn: documentation.
-
Polars: home page. DuckDB: home page. Narwhals: documentation. Ibis: documentation.
-
SciPy: home page. statsmodels: documentation.
-
Jupyter: home page.
Books
Books are linked to the publisher’s page. They were used only to decide which topics to cover; where they describe older pandas behaviour, the pages say so in prose.
-
Wes McKinney, Python for Data Analysis, 2nd edition, O’Reilly, 2017: publisher page. The 3rd edition is open access at wesmckinney.com/book.
-
Laura Igual and Santi Seguí, Introduction to Data Science, Springer, 2017: publisher page.
-
Steven S. Skiena, The Data Science Design Manual, Springer, 2017: publisher page.
-
John Hunt, Advanced Guide to Python 3 Programming, Springer, 2019: publisher page.
-
Open references: Python Data Science Handbook and R for Data Science, 2nd edition.