Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K

pandas.util.hash_pandas_object#

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

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

Parameters:
objIndex, Series, or DataFrame
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 moreefficient when the array contains duplicate values.

Returns:
Series of uint64, same length as the object

Examples

>>>pd.util.hash_pandas_object(pd.Series([1,2,3]))0    146390536861580357801     38695632792125307282      393322362522515241dtype: uint64

[8]ページ先頭

©2009-2025 Movatter.jp