fjetter opened a new issue, #38489:
URL: https://github.com/apache/arrow/issues/38489

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   Round-tripping dictionary values as part of a pandas dataframe causes the 
output dictionaries to be normalized to a common schema such that keys show up 
that are not there in the original data.
   
   ```python
   import pyarrow as pa
   import pandas as pd
   df = pd.DataFrame({"dicts": [
       {"foo": "bar"},
       {"bar": "baz"},
       {"another": "key"}
   ]})
   ```
   
![image](https://github.com/apache/arrow/assets/8629629/2e0a5ddb-798e-4a8b-a565-23252dc0452f)
   
   
   ```python
   pa.Table.from_pandas(df).to_pandas()
   ```
   
![image](https://github.com/apache/arrow/assets/8629629/d8d1a38f-6458-4e8e-85a5-70938f530a9e)
   
   This is both surprising to users and can also grow out of control to a 
certain degree
   
   
   ### Component(s)
   
   Python


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to