Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-2295

[Python] Add Array.to_numpy functions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • None
    • None
    • Python
    • None

    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 ordered 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`.

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              llchan Lawrence Chan
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: