Pint-Pandas
Extend Pandas Dataframe with Physical quantities module
What it is and what it does
Pint-Pandas bridges pandas DataFrames and the Pint unit library, letting you define DataFrame columns with physical units (e.g., "pint[lbf ft]" for torque) and perform arithmetic operations that propagate and combine units correctly. When you multiply a torque column by an angular velocity column, the result automatically carries the correct combined unit. This eliminates the need to track units separately or convert everything to a common base unit before analysis.
The package is built on top of pandas' extension array system, so unit-aware columns behave like standard DataFrame columns in most contexts. It's aimed at scientific and engineering workflows where dimensional consistency matters—simulations, data analysis, and reporting where mixing incompatible units would be a silent error without this library.
Use it for:
- Store and manipulate engineering measurements (force, torque, velocity) in a DataFrame while preserving unit information throughout calculations.
- Perform dimensional analysis on scientific datasets to catch unit mismatches early and ensure results have the correct derived units.
- Build data pipelines for physics simulations or experimental data where automatic unit propagation reduces manual conversion overhead.
- Generate reports with physical quantities that display units alongside values, improving clarity and reducing interpretation errors.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Pint-Pandas adds physical unit support to pandas DataFrames, allowing you to store, manipulate, and compute with quantities that have units (like torque in lbf·ft or angular velocity in rpm) directly within DataFrame columns.
Yes, if you work with physical quantities in pandas. Low install friction, active maintenance, no known vulnerabilities, and permissive licensing make it a safe choice. The package solves a real problem—unit tracking in data analysis—that would otherwise require manual bookkeeping or separate unit columns. Suitable for scientific, engineering, and research workflows where dimensional consistency is important.
Install
pint-pandas on PyPI
pip
pip install pint-pandasuv
uv add pint-pandaspoetry
poetry add pint-pandasInstalling Pint-Pandas
Before you install
Low friction install with active maintenance. Last commit 2026-03-20, repository not archived, and requires only three runtime dependencies (pint, pandas, packaging). Supports current Python versions (3.11, 3.12, 3.13).
License in practice
BSD permissive license allows commercial and private use with minimal restrictions—suitable for most projects that can accommodate attribution.
Quickstart
pip install pint-pandas
import pandas as pd
import pint_pandas
df = pd.DataFrame({
"torque": pd.Series([1, 2, 3], dtype="pint[lbf ft]"),
"velocity": pd.Series([1, 2, 3], dtype="pint[rpm]")
})
df['power'] = df['torque'] * df['velocity']
Requires Python 3.11 or later.
Verify before relying
- Whether unit-aware operations (arithmetic, aggregation, groupby) work seamlessly with all pandas methods or only a subset.
- Performance impact of unit tracking on large DataFrames compared to plain numeric operations.
- Compatibility with pandas extension array ecosystem and third-party libraries that expect standard dtypes.
Package facts
| License | BSD (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — pint, pandas, packaging |
| Maintenance | actively maintained — 147 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 507,903/month — #6,282 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pint_pandas-0.8.0-py3-none-any.whl
Keywords: physical, quantities, unit, conversion, science, pandas, dataframe
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
PintPint defines, operates on, and converts between…
permissive · top 5,000 on PyPI
isqxisqx provides type-annotation-friendly metadata…
permissive · top 15,000 on PyPI
pint-xarrayAdds physical units support to xarray datasets…
permissive · top 15,000 on PyPI
ansys-unitsManages physical quantities with numerical…
permissive · top 15,000 on PyPI
hepunitsProvides units and physical constants in the…
permissive · top 15,000 on PyPI
quantitiesQuantities handles arithmetic and unit…
unclear · top 15,000 on PyPI
ucumvertParses UCUM (Unified Code for Units of Measure)…
permissive · top 15,000 on PyPI
unytAttaches units to NumPy arrays and provides…
permissive · top 15,000 on PyPI
mendeleevProvides a Python API to query properties of…
permissive · top 15,000 on PyPI
pandas-flavorRegisters custom methods and accessors on…
permissive · top 5,000 on PyPI