You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Krisztian Szucs (Jira)" <ji...@apache.org> on 2019/11/01 12:03:00 UTC

[jira] [Resolved] (ARROW-7039) [Python] Typecheck expects pandas to be installed

     [ https://issues.apache.org/jira/browse/ARROW-7039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Krisztian Szucs resolved ARROW-7039.
------------------------------------
    Resolution: Fixed

Issue resolved by pull request 5764
[https://github.com/apache/arrow/pull/5764]

> [Python] Typecheck expects pandas to be installed
> -------------------------------------------------
>
>                 Key: ARROW-7039
>                 URL: https://issues.apache.org/jira/browse/ARROW-7039
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Python
>            Reporter: Krisztian Szucs
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.0.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> See nightly build failure: https://circleci.com/gh/ursa-labs/crossbow/4285?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link
> The following patch fixes it:
> {code}
> diff --git a/python/pyarrow/table.pxi b/python/pyarrow/table.pxi
> index b65dac4cb..e0a82fd76 100644
> --- a/python/pyarrow/table.pxi
> +++ b/python/pyarrow/table.pxi
> @@ -17,6 +17,7 @@
>  import warnings
> +
>  cdef class ChunkedArray(_PandasConvertible):
>      """
>      Array backed via one or more memory chunks.
> @@ -1579,7 +1580,7 @@ def record_batch(data, names=None, schema=None, metadata=None):
>      if isinstance(data, (list, tuple)):
>          return RecordBatch.from_arrays(data, names=names, schema=schema,
>                                         metadata=metadata)
> -    elif isinstance(data, _pandas_api.pd.DataFrame):
> +    elif _pandas_api.is_data_frame(data):
>          return RecordBatch.from_pandas(data, schema=schema)
>      else:
>          return TypeError("Expected pandas DataFrame or python dictionary")
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)