From b4eefa06651aafb041c0fd7ff461af25f2d1e689 Mon Sep 17 00:00:00 2001 From: Ashwin Srinath Date: Tue, 13 Apr 2021 17:30:52 -0400 Subject: [PATCH] Call `pd.api.types.is_integer_dtype()` when dtype conversion fails --- python/cudf/cudf/utils/dtypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cudf/cudf/utils/dtypes.py b/python/cudf/cudf/utils/dtypes.py index b2cf498a6b7..5dffc5eeaf5 100644 --- a/python/cudf/cudf/utils/dtypes.py +++ b/python/cudf/cudf/utils/dtypes.py @@ -158,7 +158,7 @@ def is_integer_dtype(obj): try: dtype = np.dtype(obj) except TypeError: - return False + return pd.api.types.is_integer_dtype(obj) return dtype.kind in "iu"