[
https://issues.apache.org/jira/browse/ARROW-9096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Joris Van den Bossche updated ARROW-9096:
-----------------------------------------
Summary: [Python] Pandas roundtrip with object-dtype column labels with
integer values: data type "integer" not understood (was: data type "integer"
not understood: pandas roundtrip)
> [Python] Pandas roundtrip with object-dtype column labels with integer
> values: data type "integer" not understood
> -----------------------------------------------------------------------------------------------------------------
>
> Key: ARROW-9096
> URL: https://issues.apache.org/jira/browse/ARROW-9096
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Affects Versions: 0.17.1
> Reporter: Richard Wu
> Priority: Minor
>
> The following will fail the roundtrip since the column indexes' pandas_type
> is converted from int64 to integer when an additional column is introduced
> and subsequently moved to the index:
>
> {code:java}
> df = pd.DataFrame(np.ones((3,1), index=[[1,2,3]])
> df['foo'] = np.arange(3)
> df = df.set_index('foo', append=True)
> table = pyarrow.Table.from_pandas(df)
> table.to_pandas() # Errors{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)