ARROW-439: [Python] Add option in "to_pandas" conversions to yield Categorical from...
authorfjetter <florian.jetter@blue-yonder.com>
Tue, 8 Aug 2017 17:51:37 +0000 (13:51 -0400)
committerWes McKinney <wes.mckinney@twosigma.com>
Tue, 8 Aug 2017 17:51:37 +0000 (13:51 -0400)
commit6e26701257be160fa95ce174d80b046adb493e57
treeeb3bce23c8ab2c3289032e4b405f5ff8905876cf
parent2615b47032d58284e0606b21cb216aa4b303a72c
ARROW-439: [Python] Add option in "to_pandas" conversions to yield Categorical from String/Binary arrays

I added support to cast Arrays and Columns to dictionaries with the possibility to extend the casting to different types.

I intend to add more types to the casting, at least for trivial cases, but first I wanted to get some feedback on the current state.

Author: fjetter <florian.jetter@blue-yonder.com>
Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes #909 from fjetter/feature/make_dictionary_array and squashes the following commits:

d1189395 [Wes McKinney] Fix deprecated API usage
606724df [Wes McKinney] Handle ordered categories in arrow_to_pandas.cc. flake8 Cython fixes
d2bb8d8e [Wes McKinney] Move dictionary index type dispatch and memory allocation into CategoricalBlock::Write
6ab28730 [fjetter] Remove dead code
bea4cb9e [fjetter] Merge master
bb3209ba [fjetter] Add pool to ConvertTableToPandas in python-test
24fbf424 [fjetter] Format arrow_to_pandas
39b22ff6 [fjetter] Allocate categorical blocks in write path
b7f389f3 [fjetter] Pass memory pool from the outside
c496cb5f [fjetter] Pass pandas options through to pandas write before conversion
4b12aa13 [fjetter] Push pandas options down
b6fca35c [fjetter] Rename and add docs for EncodeDictionary
6479d292 [fjetter] add MakeDictionaryArray
cpp/src/arrow/builder.cc
cpp/src/arrow/builder.h
cpp/src/arrow/python/arrow_to_pandas.cc
cpp/src/arrow/python/arrow_to_pandas.h
cpp/src/arrow/python/python-test.cc
cpp/src/arrow/util/parallel.h [new file with mode: 0644]
python/pyarrow/array.pxi
python/pyarrow/includes/libarrow.pxd
python/pyarrow/pandas_compat.py
python/pyarrow/table.pxi
python/pyarrow/tests/test_convert_pandas.py