hgrecco / pint-pandas

Pandas support for pint
Other
166 stars 40 forks source link

rpm is astype str #197

Closed mnajaria closed 7 months ago

mnajaria commented 10 months ago

Hi, I was trying the code in pint-pandas.ipynb and when I go to the following code I got an error df_.ShaftPower / df_.ShaftSpeed

TypeError: unsupported operand type(s) for /: 'float' and 'str' dtypes are image which should be fine, but the ShaftSpeed has a dtype like str, when running df_.ShaftSpeed * 2 we get image

Any idea if I am doing something wrong?

andrewgsavage commented 10 months ago

in a recent pandas version it reads that column as strings not integers.

I updated the docs but haven't merged them yet https://pint-pandas.readthedocs.io/en/docs/user/reading.html

mnajaria commented 10 months ago

Thanks for your reply :)