Closed samvanstroud closed 2 months ago
Those are the docs for pint's numpy support not for pandas
PintArray
does not have a .to() method. If you make it into a Series
you can use Series.pint.to()
https://pint-pandas.readthedocs.io/en/latest/getting/tutorial.html#pandas-series-accessors
There's also PintArray.quantity.to()
. Neither will return a PintArray
though.
How are you using PintArray
s? They aren't really intended for outside of Series
or DataFrame
as they don't have many of the properties/methods that Quantity
has.
thanks @andrewgsavage! I think I just missed this in the docs, apologies
The standard
PintArray
supports casting with.to()
as mentioned in the pint docs.With a
pint_pandas.pint_array.PintArray
I get aAttributeError: 'PintArray' object has no attribute 'to'
.