Extend Pandas Dataframe with Physical quantities module
Project description
Pint-Pandas
Pandas support for pint
>>> import pandas as pd
>>> import pint_pandas
>>> 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
More examples are shown in the example notebook https://github.com/hgrecco/pint-pandas/blob/master/notebooks/pint-pandas.ipynb
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!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Pint-Pandas-0.4.tar.gz
(27.6 kB
view hashes)
Built Distribution
Pint_Pandas-0.4-py3-none-any.whl
(22.7 kB
view hashes)
Close
Hashes for Pint_Pandas-0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e2e8766eaec24360c8d4c14486423ac26f4547205f87d88c926132491d8d596 |
|
MD5 | 43648527dd9daa8ea61daf623d71885c |
|
BLAKE2b-256 | 322d113b22aefebbc62b2c19b3e4980232cbd810dbad9f042179e5d8fe69b7be |