diff --git a/python-package/xgboost/data.py b/python-package/xgboost/data.py index cd0e686d168f..53383171e54e 100644 --- a/python-package/xgboost/data.py +++ b/python-package/xgboost/data.py @@ -845,11 +845,21 @@ def _arrow_transform(data: DataType) -> Any: def _is_cudf_df(data: DataType) -> bool: return lazy_isinstance(data, "cudf.core.dataframe", "DataFrame") + def _is_cudf_pandas_df(data: DataType) -> bool: - return str(type(data)) == "" and str(type(type(data))) == "" + return ( + str(type(data)) == "" + and str(type(type(data))) + == "" + ) + def _is_cudf_pandas_ser(data: DataType) -> bool: - return str(type(data)) == "" and str(type(type(data))) == "" + return ( + str(type(data)) == "" + and str(type(type(data))) + == "" + ) def _get_cudf_cat_predicate() -> Callable[[Any], bool]: