Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-1586

[PYTHON] serialize_pandas roundtrip loses columns name

    Details

      Description

      The serialize / deserialize roundtrip loses {{ df.columns.name }}

      In [1]: import pandas as pd
      
      In [2]: import pyarrow as pa
      
      In [3]: df = pd.DataFrame([[1, 2]], columns=pd.Index(['a', 'b'], name='col_name'))
      
      In [4]: df.columns.name
      Out[4]: 'col_name'
      
      In [5]: pa.deserialize_pandas(pa.serialize_pandas(df)).columns.name
      

      Is this in scope for pyarrow? I suspect it would require an update to the pandas section of the Schema metadata.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cpcloud Phillip Cloud
                Reporter:
                TomAugspurger Tom Augspurger
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: