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

Lawrence Chan updated ARROW-2295:
---------------------------------
    Description: 
There are `to_pandas()` functions, but no `to_numpy()` functions. I'd like to 
propose that we include both.

Also, `pyarrow.lib.Array.to_pandas()` returns a `numpy.ndarray`, which imho is 
very confusing :). I think it would be more intuitive for the `to_pandas()` 
functions to return `pandas.Series` and `pandas.DataFrame` objects, and the 
`to_numpy()` functions to return `numpy.ndarray` and either a dict of 
`numpy.ndarray` or a structured `numpy.ndarray` depending on a flag, for 
example. The `to_pandas()` function is of course welcome to use the 
`to_numpy()` func to avoid the additional index and whatnot of the 
`pandas.Series`.

 

  was:
There are `to_pandas()` functions, but no `to_numpy()` functions. I'd like to 
propose that we include both.

Also, `pyarrow.lib.Array.to_pandas()` returns a `numpy.ndarray`, which imho is 
very confusing :). I think it would be more intuitive for the `to_pandas()` 
functions to return `pandas.Series` and `pandas.DataFrame` objects, and the 
`to_numpy()` functions to return `numpy.ndarray` and either a dict of 
`numpy.ndarray` or a structured `numpy.ndarray` depending on a flag, for 
example. The `to_pandas()` function is of course welcome to use the 
`to_numpy()` func to avoid the additional indexes and whatnot of the 
`pandas.Series`.

 


> Add to_numpy functions
> ----------------------
>
>                 Key: ARROW-2295
>                 URL: https://issues.apache.org/jira/browse/ARROW-2295
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Python
>            Reporter: Lawrence Chan
>            Priority: Minor
>
> There are `to_pandas()` functions, but no `to_numpy()` functions. I'd like to 
> propose that we include both.
> Also, `pyarrow.lib.Array.to_pandas()` returns a `numpy.ndarray`, which imho 
> is very confusing :). I think it would be more intuitive for the 
> `to_pandas()` functions to return `pandas.Series` and `pandas.DataFrame` 
> objects, and the `to_numpy()` functions to return `numpy.ndarray` and either 
> a dict of `numpy.ndarray` or a structured `numpy.ndarray` depending on a 
> flag, for example. The `to_pandas()` function is of course welcome to use the 
> `to_numpy()` func to avoid the additional index and whatnot of the 
> `pandas.Series`.
>  



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

Reply via email to