skillfed

Pint-Pandas

Extend Pandas Dataframe with Physical quantities module

pint-pandas v0.8.0 507.9K downloads/30d#6,282 on PyPI189
Permissive license BSD Active released

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-pandas

uv

uv add pint-pandas

poetry

poetry add pint-pandas

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Scientific/EngineeringTopic :: Software Development :: Libraries

Tags

pandas dataframe unitsphysical quantities pandasunit conversion dataframepint pandas integrationscientific data with unitsdimensional analysis pandas
unit-conversionscientific-computing

More Libraries packages