Wes McKinney created ARROW-4832:
-----------------------------------

             Summary: [Python] pandas Index metadata for RangeIndex is incorrect
                 Key: ARROW-4832
                 URL: https://issues.apache.org/jira/browse/ARROW-4832
             Project: Apache Arrow
          Issue Type: Bug
          Components: Python
            Reporter: Wes McKinney
             Fix For: 0.14.0


I'm looking at ARROW-1639 to optimize storage and loading of RangeIndex, but in 
the meantime I wanted to report this oddness:

{code}
In [9]: df = pd.DataFrame({'a': [1, 2, 3]})                                     
               

In [10]: json.loads(pa.Table.from_pandas(df).schema.metadata[b'pandas'])        
               
Out[10]: 
{'index_columns': ['__index_level_0__'],
 'column_indexes': [{'name': None,
   'field_name': None,
   'pandas_type': 'unicode',
   'numpy_type': 'object',
   'metadata': {'encoding': 'UTF-8'}}],
 'columns': [{'name': 'a',
   'field_name': 'a',
   'pandas_type': 'int64',
   'numpy_type': 'int64',
   'metadata': None},
  {'name': None,
   'field_name': '__index_level_0__',
   'pandas_type': 'int64',
   'numpy_type': 'int64',
   'metadata': None}],
 'pandas_version': '0.23.4'}
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to