pyarrow.compute.dictionary_encode

pyarrow.compute.dictionary_encode(array, *, memory_pool=None, options=None, null_encoding='mask')

Dictionary-encode array.

Return a dictionary-encoded version of the input array.

Parameters
  • array (Array-like) – Argument to compute function

  • memory_pool (pyarrow.MemoryPool, optional) – If not passed, will allocate memory from the default memory pool.

  • options (pyarrow.compute.DictionaryEncodeOptions, optional) – Parameters altering compute function semantics.

  • null_encoding (optional) – Parameter for DictionaryEncodeOptions constructor. Either options or null_encoding can be passed, but not both at the same time.