pandas
Powerful data structures for data analysis, time series, and statistics
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.
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.
Install pandas
pip install pandas
import pandasUse 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.
Ready to explore the full API?
See every class, function, and relationship in an interactive graph.