diff --git a/python/cudf/cudf/core/frame.py b/python/cudf/cudf/core/frame.py index 12cef665dd8..662ed05e2df 100644 --- a/python/cudf/cudf/core/frame.py +++ b/python/cudf/cudf/core/frame.py @@ -1195,7 +1195,7 @@ def scatter_by_map( map_index = as_column(map_index) # Convert float to integer - if map_index.dtype == float: + if map_index.dtype.kind == "f": map_index = map_index.astype(np.int32) # Convert string or categorical to integer