pandas.api.extensions.ExtensionArray._hash_pandas_object#
- ExtensionArray._hash_pandas_object(*, encoding, hash_key, categorize)[源代码]#
hash_pandas_object 的钩子。
默认情况下,使用 _values_for_factorize 返回的值。
- Parameters:
- encodingstr
字符串的 data & key 编码。
- hash_keystr
用于编码字符串键的 Hash_key。
- categorizebool
在哈希之前是否先对 object 数组进行分类。当数组包含重复值时,这更有效。
- 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)