I am trying to reproduce the example described in the Python Pint library here.
In the section "Reading from csv" when running the following line:
df_ = df.pint.quantify(level=-1)
I got the following message error:
AttributeError: 'DataFrame' object has no attribute 'pint'
Has anybody a solution to that?
Thanks in advance!
Best regards.
As @Ivan noted in the comments, you need to install pint-pandas
package:
pip install git+https://github.com/hgrecco/pint-pandas.git
Pandas has an open issue regarding this.