<MY_PATH>\Lib\site-packages\pandas\core\dtypes\missing.py:225: UnitStrippedWarning: The unit of the quantity is stripped when downcasting to ndarray.
return _isna_array(np.asarray(obj), inf_as_na=inf_as_na)
0 2
1 2
2 2
3 3
Name: torque, dtype: pint[foot * force_pound]
It calculates the correct values, but issues a warning.
I have also tested using a non-typed value as the bound and that results in an error (as it should) - except for 0, which for some reason works and does not issue the warning.
I don't get that warning using pint master. I thnik https://github.com/hgrecco/pint/pull/1909 removes the warning, so it'll go when the next pint version is released.
Using clip on pint-typed columns issues
UnitStrippedWarning
with Pint-Pandas 0.5, Pint 0.23 and pandas 2.1.4, on Windows. For example:results in
It calculates the correct values, but issues a warning.
I have also tested using a non-typed value as the bound and that results in an error (as it should) - except for 0, which for some reason works and does not issue the warning.