Pythonpandasv3.0.2
PythonBeginner-friendly

pandas

Powerful data structures for data analysis, time series, and statistics

dataframedata-analysiscsvpandastabularscientific/engineering
The Problem

Analysing tabular data in Python before pandas meant juggling lists of dicts, writing CSV parsers by hand, and implementing your own groupby logic. Wes McKinney built pandas while working at a hedge fund because no existing tool gave Python the data manipulation power that R had with data frames.

Mental Model

A pandas DataFrame is a spreadsheet you program. Rows and columns have labels; you filter with boolean masks, transform with .apply(), aggregate with .groupby(), and join with .merge() — all without writing loops. The mental shift is to describe the shape of the data you want, not the steps to get there.

60-second start

Install pandas

pip install pandas
import pandas

Use it when

Use pandas for data cleaning, exploration, and transformation: reading CSV/Excel/JSON files, computing statistics, reshaping data before feeding it to a model, or generating reports. It's the standard tool for the 'data wrangling' phase of any data science or analytics project.

Skip it when

Pandas struggles with datasets larger than a few GB in RAM. For big data, use Polars (faster, lower memory) or Dask (distributed pandas). For pure numerical math without labels, NumPy is more appropriate.

Alternatives
polars10-50x faster than pandas on typical workloads; better memory efficiency; recommended for new projects
daskDistributed pandas — same API but works on datasets larger than RAM
numpyLower-level but faster when you only need numerical arrays without labelled columns

Ready to explore the full API?

See every class, function, and relationship in an interactive graph.