Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] Support list-of-boolean in Array.to_pandas conversion #22743

Closed
asfimport opened this issue Aug 27, 2019 · 1 comment
Closed

[Python] Support list-of-boolean in Array.to_pandas conversion #22743

asfimport opened this issue Aug 27, 2019 · 1 comment

Comments

@asfimport
Copy link

See

In [4]: paste                                                                                                                                                                                  
a = pa.array(np.array([[True, False], [True, True, True]]))

## -- End pasted text --

In [5]: a                                                                                                                                                                                      
Out[5]: 
<pyarrow.lib.ListArray object at 0x7fc187d3fa40>
[
  [
    true,
    false
  ],
  [
    true,
    true,
    true
  ]
]

In [6]: a.to_pandas()                                                                                                                                                                          
---------------------------------------------------------------------------
ArrowNotImplementedError                  Traceback (most recent call last)
<ipython-input-6-08d835d60bd1> in <module>
----> 1 a.to_pandas()

~/code/arrow/python/pyarrow/array.pxi in pyarrow.lib._PandasConvertible.to_pandas()
    439             deduplicate_objects=deduplicate_objects)
    440 
--> 441         return self._to_pandas(options, categories=categories,
    442                                ignore_metadata=ignore_metadata)
    443 

~/code/arrow/python/pyarrow/array.pxi in pyarrow.lib.Array._to_pandas()
    815 
    816         with nogil:
--> 817             check_status(ConvertArrayToPandas(c_options, self.sp_array,
    818                                               self, &out))
    819         return wrap_array_output(out)

~/code/arrow/python/pyarrow/error.pxi in pyarrow.lib.check_status()
     84             raise ArrowKeyError(message)
     85         elif status.IsNotImplemented():
---> 86             raise ArrowNotImplementedError(message)
     87         elif status.IsTypeError():
     88             raise ArrowTypeError(message)

ArrowNotImplementedError: Not implemented type for lists: bool
In ../src/arrow/python/arrow_to_pandas.cc, line 1910, code: VisitTypeInline(*data_->type(), this)

as reported in #5203

Reporter: Wes McKinney / @wesm
Assignee: Wes McKinney / @wesm

PRs and other links:

Note: This issue was originally created as ARROW-6369. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Krisztian Szucs / @kszucs:
Issue resolved by pull request 5301
#5301

@asfimport asfimport added this to the 0.15.0 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants