You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Wes McKinney (JIRA)" <ji...@apache.org> on 2018/12/31 16:45:00 UTC
[jira] [Resolved] (ARROW-4135) [Python] Can't reload a pandas
dataframe containing a list of datetime.time
[ https://issues.apache.org/jira/browse/ARROW-4135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wes McKinney resolved ARROW-4135.
---------------------------------
Resolution: Fixed
Issue resolved by pull request 3289
[https://github.com/apache/arrow/pull/3289]
> [Python] Can't reload a pandas dataframe containing a list of datetime.time
> ----------------------------------------------------------------------------
>
> Key: ARROW-4135
> URL: https://issues.apache.org/jira/browse/ARROW-4135
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Affects Versions: 0.11.1
> Reporter: Krisztian Szucs
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.12.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Ported from https://github.com/apache/arrow/issues/3223
> This simple script writes a panda dataframe with a list of datetime.time. However, constructing back the pandas dataframe fails.
> I initially realised that when doing a pd.read_parquet('example.parquet'), which fails with the same error.
> This is using
> pyarrow 0.11.1
> pandas 0.23.4
> {code}
> import pandas as pd
> import pyarrow as pa
> import pyarrow.parquet as pq
> times = pd.to_datetime(['09:00', '09:30', '10:00', '10:30', '11:00', '11:30', '12:00']).time
> df = pd.DataFrame({'Time': [times]})
> table = pa.Table.from_pandas(df)
> pq.write_table(table, 'example.parquet')
> # works
> table2 = pq.read_table('example.parquet')
> # fails: ArrowNotImplementedError: Not implemented type for list in DataFrameBlock: time64[us]
> df2 = pa.Table.to_pandas(table2)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)