pandas.util.hash_pandas_object

pandas.util.hash_pandas_object(obj, index=True, encoding='utf8', hash_key=None, categorize=True)[source]

Return a data hash of the Index/Series/DataFrame

New in version 0.19.2.

Parameters
indexboolean, default True

include the index in the hash (if Series/DataFrame)

encodingstring, default ‘utf8’

encoding for data & key when strings

hash_keystring key to encode, default to _default_hash_key
categorizebool, default True

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

New in version 0.20.0.

Returns
Series of uint64, same length as the object
Scroll To Top