Skip to main content
`Ctrl`+`K`

# pandas.api.extensions.ExtensionArray._hash_pandas_object

ExtensionArray._hash_pandas_object(*, encoding, hash_key, categorize)

  Hook for hash_pandas_object.

  Default is to use the values returned by _values_for_factorize.

  Parameters:
    encoding str

      Encoding for data & key when strings.

    hash_key str

      Hash_key for string key to encode.

    categorize bool

      Whether to first categorize object arrays before hashing. This is more efficient when the array contains duplicate values.

  Returns:
    np.ndarray[uint64]

  Examples

      >>> pd.array([1, 2])._hash_pandas_object(encoding='utf-8',
      ...                                      hash_key="1000000000000000",
      ...                                      categorize=False
      ...                                      )
      array([ 6238072747940578789, 15839785061582574730], dtype=uint64)