Skip to content

deniz195/pint-pandas

 
 

Repository files navigation

Latest Version

Documentation

License

Python Versions

CI

Coverage

Docs

Pint-Pandas

Pandas support for pint

>>> import pandas as pd
>>> import pint
>>> df = pd.DataFrame({
...     "torque": pd.Series([1, 2, 2, 3], dtype="pint[lbf ft]"),
...     "angular_velocity": pd.Series([1, 2, 2, 3], dtype="pint[rpm]"),
... })
>>> df['power'] = df['torque'] * df['angular_velocity']
>>> df.dtypes
torque                                       pint[foot * force_pound]
angular_velocity                         pint[revolutions_per_minute]
power               pint[foot * force_pound * revolutions_per_minute]
dtype: object

Quick Installation

To install Pint-Pandas, simply:

$ pip install pint-pandas

or utilizing conda, with the conda-forge channel:

$ conda install -c conda-forge pint-pandas

and then simply enjoy it!

About

Pandas support for pint

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 64.3%
  • Jupyter Notebook 35.7%