You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given an index which contains datetimes but is no DateTimeIndex writing the file works but reading back fails.
df=pd.DataFrame(1, index=pd.MultiIndex.from_arrays([[1,2],[3,4]]), columns=[pd.to_datetime("2018/01/01")])
# columns index is no DateTimeIndex anymoredf=df.reset_index().set_index(['level_0', 'level_1'])
table=pa.Table.from_pandas(df)
pq.write_table(table, 'test.parquet')
pq.read_pandas('test.parquet').to_pandas()
Armin Berres:
Not sure but maybe Pandas should behave different in this case as well and create a DateTimeIndex index in this case as the complete index consists of Timestamp objects?
df.columns = pd.to_datetime(df.columns) in the code above mitigates the problem.
Given an index which contains datetimes but is no DateTimeIndex writing the file works but reading back fails.
results in
The created schema:
Reporter: Armin Berres
Assignee: Wes McKinney / @wesm
PRs and other links:
Note: This issue was originally created as ARROW-3651. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered: