Return a data hash of the Index/Series/DataFrame.
Include the index in the hash (if Series/DataFrame).
Encoding for data & key when strings.
Hash_key for string key to encode.
Whether to first categorize object arrays before hashing. This is more efficient when the array contains duplicate values.
Examples
>>> pd.util.hash_pandas_object(pd.Series([1, 2, 3]))
0 14639053686158035780
1 3869563279212530728
2 393322362522515241
dtype: uint64
© 2008–2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
© 2011–2025, Open source contributors
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/2.3.0/reference/api/pandas.util.hash_pandas_object.html