martin-liu commented on PR #13402:
URL: https://github.com/apache/arrow/pull/13402#issuecomment-1163722508

   @lidavidm After some debug, it seems like existing code has bug regarding 
column names, see below example:
   
   ```python
   >>> import pandas as pd
   >>> import pyarrow as pa
   
   >>> df = pd.DataFrame({0.1: [0.2333], 'a': [0.3444], 3: [0.4555]})
   
   >>> df.columns
   Index([0.1, 'a', 3], dtype='object')
   
   >>> pa.Table.from_pandas(df).to_pandas().columns
   Index(['0.1', 'a', '3'], dtype='object')
   ```
   
   I'm not that familiar with the code, but the column names preservation 
happens in [this 
code](https://github.com/apache/arrow/blob/master/python/pyarrow/pandas_compat.py#L1138)
 which seems problematic 


-- 
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