Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K

pandas.api.types.is_named_tuple#

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

Check if the object is a named tuple.

Parameters:
objThe object to check
Returns:
bool

Whetherobj is a named tuple.

Examples

>>>fromcollectionsimportnamedtuple>>>frompandas.api.typesimportis_named_tuple>>>Point=namedtuple("Point",["x","y"])>>>p=Point(1,2)>>>>>>is_named_tuple(p)True>>>is_named_tuple((1,2))False

[8]ページ先頭

©2009-2025 Movatter.jp