Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K

pandas.api.types.is_hashable#

pandas.api.types.is_hashable(obj)[source]#

Return True if hash(obj) will succeed, False otherwise.

Some types will pass a test against collections.abc.Hashable but fail whenthey are actually hashed with hash().

Distinguish between these and other types by trying the call to hash() andseeing if they raise TypeError.

Returns:
bool

Examples

>>>importcollections>>>frompandas.api.typesimportis_hashable>>>a=([],)>>>isinstance(a,collections.abc.Hashable)True>>>is_hashable(a)False

[8]ページ先頭

©2009-2025 Movatter.jp