Closed MichaelTiemannOSC closed 1 year ago
you are not using pint-pandas here; the dataframe is object dtype
df_pp.dtypes
2019 object
2020 object
2021 object
2022 object
2023 object
2024 object
2025 object
dtype: object
Now that df_pp.astype('pint[]') works, the fix for my problem is obvious.
The following sample code shows that pint-pandas knows how to multiple a dimensionless thing by a unit thing to get a multiplicative unit thing. But not always.
In the first case, where we multiply a dimensionless Series by a t of production, we get a dimensionless result. In the second case, using the
values
slot of the Series, we get the correctly quantified amount.