You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is the program output (with a UnitStripped warning message removed):
0 1.234568
1 2.345679
dtype: float64
0 1.23
1 2.35
dtype: float64
0 1.2345678
1 2.3456789
dtype: pint[meter]
Traceback (most recent call last):
File "/Users/michael/Documents/GitHub/ITR-MichaelTiemannOSC/examples/pint-round.py", line 11, in <module>
print(bb.round(2))
File "/Users/michael/Documents/GitHub/pandas/pandas/core/series.py", line 2602, in round
result = self._values.round(decimals)
AttributeError: 'PintArray' object has no attribute 'round'
Is there a reasonable way to define what mathods are intended to work on dimensionless units and allow delegation to the array of magnitudes to take place? PintArray does delegation for a number of reduce functions. Perhaps it could delegate for things like rounding as well.
The text was updated successfully, but these errors were encountered:
Did find this pandas-dev/pandas#26730 from a long time ago, sheds a little light. (can't expect extensionarray implementers to implement every possible pandas method)
I agree, it would be great to have a tracker list of what works/doesn't, especially now the scalar issue has been fixed. I'd welcome a tracker issue
It is convenient to use pd.Series.round, but not with PintArrays. Here is a testcase:
Here is the program output (with a UnitStripped warning message removed):
Is there a reasonable way to define what mathods are intended to work on dimensionless units and allow delegation to the array of magnitudes to take place? PintArray does delegation for a number of
reduce
functions. Perhaps it could delegate for things like rounding as well.The text was updated successfully, but these errors were encountered: