Closed mflova closed 2 months ago
what versions are you using? tis works fine for me
pint_pandas.show_versions()
{'numpy': '1.25.2',
'pandas': '2.1.0',
'pint': '0.23',
'pint_pandas': '0.6.dev6+g2e087e6'}
df = pd.DataFrame({"a": [1,2,3], "b": [1,2,3]})
print(df)
a b
0 1 1
1 2 2
2 3 3
df = df.astype("pint[rpm]")
print(df)
a b
0 1 1
1 2 2
2 3 3
I apologize, it seems I was using some outdated versions I should have checked. It is fixed now. I will start using the tool. Thanks!
I am not sure if this is more on the
pint
side about how the pint array is represented or if it belongs topint-pandas
, but I consider this to be a critical problem as the representation is totally missleading and wrong:This problem seems to be present whenever a
pint
data (with multiple values) needs to be displayed. Therefore, printing after an aggregation based method is performed is also broken. I also tested withMultiIndex
in both index and columns and also broken