pandas.util.hash_pandas_object

pandas.util.hash_pandas_object(obj, index: bool = True, encoding: str = 'utf8', hash_key: Union[str, NoneType] = '0123456789123456', categorize: bool = True)[source]

Return a data hash of the Index/Series/DataFrame.

Parameters
indexbool, default True

Include the index in the hash (if Series/DataFrame).

encodingstr, default ‘utf8’

Encoding for data & key when strings.

hash_keystr, default _default_hash_key

Hash_key for string key to encode.

categorizebool, default True

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

Returns
Series of uint64, same length as the object