ARROW-9429: [Python] ChunkedArray.to_numpy#7868
ARROW-9429: [Python] ChunkedArray.to_numpy#7868kszucs wants to merge 3 commits intoapache:masterfrom
Conversation
jorisvandenbossche
left a comment
There was a problem hiding this comment.
While it technically is still using pandas during the conversion it exposes the to_numpy() method.
I think it is actually not using pandas (although the ConvertChunkedArrayToPandas name is certainly confusing in that case, but I thought this also worked without pandas being present. It just converts the arrow data to an array or dict that is in the appropriate form to convert to pandas)
|
@kszucs Can you rebase this PR? Hopefully it will fix AppVeyor. |
python/pyarrow/table.pxi
Outdated
There was a problem hiding this comment.
Does this work if there's zero chunk, or do you need to pass the type explicitly?
There was a problem hiding this comment.
Need to pass the type explicitly, fixing it.
python/pyarrow/table.pxi
Outdated
There was a problem hiding this comment.
Either "All array chunks" (plural) or "Each array chunk" (singular).
|
@pitrou rebased and addressed your comments |
While it technically is still using pandas during the conversion it exposes the to_numpy() method.
Also refactored the chunked array construction to support more flexible input, see the test case.