Commits


arw2019 authored and Wes McKinney committed 50d6252ea6b
ARROW-9096: [Python] Pandas roundtrip with dtype="object" underlying numeric column index - [x] closes ARROW-9096 - [x] tests added & passed This PR fixes the roundtrip conversion for Pandas DataFrames whose column index is numeric but has `dtype=object`, such as ``` df = pd.DataFrame([1], columns=pd.Index([1], dtype=object)) # underlying int df = pd.DataFrame([1], columns=pd.Index([1.1], dtype=object)) # underlying float df = pd.DataFrame([1], columns=pd.Index([datetime(2018, 1, 1)], dtype='object')) # underlying datetime ``` https://issues.apache.org/jira/browse/ARROW-3651 largely solved the datetime variant of this problem (such that the conversion ran correctly excepting that the dtype after roundtrip did not match). With the current fix a roundtrip of the problematic DataFrames from ARROW-3651 returns the exact original frame. Closes #7822 from arw2019/ARROW-9096 Authored-by: arw2019 <andrew.r.wieteska@gmail.com> Signed-off-by: Wes McKinney <wesm@apache.org>