Open wenjuno opened 7 months ago
This looks the same as https://github.com/pandas-dev/pandas/issues/53011
Hi @bretttully , thanks for pointing that out, I didn't notice that ticket. Yes I think that the root cause of the problem is probably the same. I think my example is narrower in the scope where there is no file operation involved, the problem is in roundtripping the data type between pandas and pyarrow. I guess any nontrivial or pyarrow specific data type will trigger the same problem. Thanks.
Pandas version checks
[X] I have checked that this issue has not already been reported.
[X] I have confirmed this bug exists on the latest version of pandas.
[ ] I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
It seems the arrow specific dtype from pandas is carried over to the pyarrow Table (
tbl2
in the example) and when trying to convert to pandas again (last line in the example constructingdf2
) it somehow cannot understand the metadata. I get this exception from it:Expected Behavior
I expect to get the same DataFrame as the first DataFrame
df
.Installed Versions