pyarrow.compute.dictionary_encode#
- pyarrow.compute.dictionary_encode(array, /, null_encoding='mask', *, options=None, memory_pool=None)#
Dictionary-encode array.
Return a dictionary-encoded version of the input array.
- Parameters
- arrayArray-like
Argument to compute function.
- null_encoding
str
, default “mask” How to encode nulls in the input. Accepted values are “mask” (null inputs emit a null in the indices array), “encode” (null inputs emit a non-null index pointing to a null value in the dictionary array).
- options
pyarrow.compute.DictionaryEncodeOptions
, optional Alternative way of passing options.
- memory_pool
pyarrow.MemoryPool
, optional If not passed, will allocate memory from the default memory pool.