From 568be9af7d79c21e5b6b0cc3d5a889c156944556 Mon Sep 17 00:00:00 2001 From: Sudomarko Date: Fri, 16 Apr 2021 18:16:14 -0400 Subject: [PATCH] BUG: Changing return is_named_tuble to a tuple sublclass #40682 --- pandas/core/dtypes/inference.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/dtypes/inference.py b/pandas/core/dtypes/inference.py index 58da2570015b5..c2759be07c857 100644 --- a/pandas/core/dtypes/inference.py +++ b/pandas/core/dtypes/inference.py @@ -315,7 +315,7 @@ def is_named_tuple(obj) -> bool: >>> is_named_tuple((1, 2)) False """ - return isinstance(obj, tuple) and hasattr(obj, "_fields") + return isinstance(obj, abc.Sequence) and hasattr(obj, "_fields") def is_hashable(obj) -> bool: