Open mflova opened 1 month ago
It's a series accessor. You could make a pr adding a data frame accessor. You'd need to handle columns with non pint type, such as int or float or string, and pint types that have different dimensionality so shouldn't be converted.
I was playing with some of the examples within the docs. Here I found there is supposed to be
pint.to()
to convert to specific units. I tried to followed the example in this page but.to
seems not to be an attribute of thePint
dataframe accessor.I printed the attributes of the accessor and I got:
convert_object_dtype
,dequantify
,quantify
,to_base_units
. I saw from the source code that some other attributes such asto
are delegated to theSeries
, but not to the dataframe. If there are future intentions of adding it to the whole dataframe, I will be happy to add it