[ 
https://issues.apache.org/jira/browse/ARROW-5540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16862073#comment-16862073
 ] 

Michał Kujawski edited comment on ARROW-5540 at 6/12/19 1:00 PM:
-----------------------------------------------------------------

[~jorisvandenbossche] thank you for a quick reply.

The types of my data are:
{code:java}
type(dtype.tz) : <class 'dateutil.tz.tz.tzoffset'>{code}
and
{code:java}
type(dtype) : <class 'pandas.core.dtypes.dtypes.DatetimeTZDtype'>{code}
 

The issue you have linked seems the same as mine.

 


was (Author: koojav):
[~jorisvandenbossche] thank you for a quick reply.

I'm using Pandas for to take care of datetime parsing. Types of my data are:
{code:java}
type(dtype.tz) : <class 'dateutil.tz.tz.tzoffset'>{code}
and
{code:java}
type(dtype) : <class 'pandas.core.dtypes.dtypes.DatetimeTZDtype'>{code}
 

The issue you have linked seems the same as mine.

 

> [Python] pa.lib.tzinfo_to_string(tz) throws ValueError: Unable to convert 
> timezone `tzoffset(None, -14400)` to string
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: ARROW-5540
>                 URL: https://issues.apache.org/jira/browse/ARROW-5540
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>            Reporter: Michał Kujawski
>            Priority: Major
>
> *Overview:*
> When trying to save DataFrame to parquet error is thrown while parsing a 
> column with the following properties:
>  
> {code:java}
> dtype: datetime64[ns, tzoffset(None, -14400)]
> dtype.tz: tzoffset(None, -14400)
> {code}
>  
>  
> *Error:* 
> {code:java}
> ValueError: Unable to convert timezone `tzoffset(None, -14400)` to 
> string{code}
>  
> *Error stack:*
> {code:java}
> File "pyarrow/table.pxi", line 1139, in pyarrow.lib.Table.from_pandas
> File 
> "/home/koojav/projects/toptal/teftel/.venv/lib/python3.6/site-packages/pyarrow/pandas_compat.py",
>  line 480, in dataframe_to_arrays
> types)
> File 
> "/home/koojav/projects/toptal/teftel/.venv/lib/python3.6/site-packages/pyarrow/pandas_compat.py",
>  line 209, in construct_metadata
> field_name=sanitized_name)
> File 
> "/home/koojav/projects/toptal/teftel/.venv/lib/python3.6/site-packages/pyarrow/pandas_compat.py",
>  line 153, in get_column_metadata
> string_dtype, extra_metadata = get_extension_dtype_info(column)
> File 
> "/home/koojav/projects/toptal/teftel/.venv/lib/python3.6/site-packages/pyarrow/pandas_compat.py",
>  line 126, in get_extension_dtype_info
> metadata = {'timezone': pa.lib.tzinfo_to_string(dtype.tz)}
> File "pyarrow/types.pxi", line 1149, in pyarrow.lib.tzinfo_to_string
> ValueError: Unable to convert timezone `tzoffset(None, -14400)` to string
> {code}
> *Libraries:*
>  * pandas 0.24.2
>  * pyarrow 0.13.0



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

Reply via email to