diff --git a/python/cudf/cudf/core/dataframe.py b/python/cudf/cudf/core/dataframe.py index 74f53c017e2..436f14cf6e3 100644 --- a/python/cudf/cudf/core/dataframe.py +++ b/python/cudf/cudf/core/dataframe.py @@ -25,6 +25,7 @@ import cudf from cudf import _lib as libcudf from cudf._lib.null_mask import MaskState, create_null_mask +from cudf.api.types import is_bool_dtype, is_dict_like from cudf.core import column, reshape from cudf.core.abc import Serializable from cudf.core.column import as_column, column_empty @@ -54,8 +55,6 @@ ) from cudf.utils.utils import GetAttrGetItemMixin -from ..api.types import is_bool_dtype, is_dict_like - T = TypeVar("T", bound="DataFrame") diff --git a/python/cudf/cudf/core/frame.py b/python/cudf/cudf/core/frame.py index 5da6f7d8f2f..5e4293f8f8b 100644 --- a/python/cudf/cudf/core/frame.py +++ b/python/cudf/cudf/core/frame.py @@ -17,6 +17,7 @@ import cudf from cudf import _lib as libcudf from cudf._typing import ColumnLike, DataFrameOrSeries +from cudf.api.types import is_dict_like, is_dtype_equal from cudf.core.column import ( ColumnBase, as_column, @@ -36,8 +37,6 @@ min_scalar_type, ) -from ..api.types import is_dict_like, is_dtype_equal - T = TypeVar("T", bound="Frame") if TYPE_CHECKING: diff --git a/python/cudf/cudf/core/index.py b/python/cudf/cudf/core/index.py index 49bede7f58c..a307aab93dd 100644 --- a/python/cudf/cudf/core/index.py +++ b/python/cudf/cudf/core/index.py @@ -17,6 +17,12 @@ from cudf._lib.search import search_sorted from cudf._lib.table import Table from cudf._typing import DtypeObj +from cudf.api.types import ( + _is_scalar_or_zero_d_array, + is_dtype_equal, + is_integer, + is_string_dtype, +) from cudf.core.abc import Serializable from cudf.core.column import ( CategoricalColumn, @@ -47,13 +53,6 @@ ) from cudf.utils.utils import cached_property, search_range -from ..api.types import ( - _is_scalar_or_zero_d_array, - is_dtype_equal, - is_integer, - is_string_dtype, -) - class BaseIndex(SingleColumnFrame, Serializable): """Base class for all cudf Index types.""" diff --git a/python/cudf/cudf/core/indexing.py b/python/cudf/cudf/core/indexing.py index 3c9dc127ce2..e6359efacd6 100755 --- a/python/cudf/cudf/core/indexing.py +++ b/python/cudf/cudf/core/indexing.py @@ -11,6 +11,12 @@ from cudf._lib.concat import concat_columns from cudf._lib.scalar import _is_null_host_scalar from cudf._typing import ColumnLike, DataFrameOrSeries, ScalarLike +from cudf.api.types import ( + is_bool_dtype, + is_integer, + is_integer_dtype, + is_numeric_dtype, +) from cudf.core.column.column import as_column from cudf.utils.dtypes import ( _is_non_decimal_numeric_dtype, @@ -23,13 +29,6 @@ to_cudf_compatible_scalar, ) -from ..api.types import ( - is_bool_dtype, - is_integer, - is_integer_dtype, - is_numeric_dtype, -) - def indices_from_labels(obj, labels): from cudf.core.column import column diff --git a/python/cudf/cudf/core/series.py b/python/cudf/cudf/core/series.py index ad2df0849c3..31ebf90b3c2 100644 --- a/python/cudf/cudf/core/series.py +++ b/python/cudf/cudf/core/series.py @@ -18,6 +18,7 @@ import cudf from cudf import _lib as libcudf from cudf._lib.transform import bools_to_mask +from cudf.api.types import is_bool_dtype, is_dict_like, is_dtype_equal from cudf.core.abc import Serializable from cudf.core.column import ( DatetimeColumn, @@ -61,8 +62,6 @@ get_relevant_submodule, ) -from ..api.types import is_bool_dtype, is_dict_like, is_dtype_equal - class Series(SingleColumnFrame, Serializable): # The `constructor*` properties are used by `dask` (and `dask_cudf`) diff --git a/python/cudf/cudf/utils/dtypes.py b/python/cudf/cudf/utils/dtypes.py index 7af288c3094..4f0c02f5002 100644 --- a/python/cudf/cudf/utils/dtypes.py +++ b/python/cudf/cudf/utils/dtypes.py @@ -11,9 +11,7 @@ from pandas.core.dtypes.common import infer_dtype_from_object import cudf -from cudf.core._compat import PANDAS_GE_120 - -from ..api.types import ( # noqa: F401 +from cudf.api.types import ( # noqa: F401 _is_non_decimal_numeric_dtype, _is_scalar_or_zero_d_array, is_categorical_dtype, @@ -30,6 +28,7 @@ is_struct_dtype, is_timedelta_dtype, ) +from cudf.core._compat import PANDAS_GE_120 _NA_REP = "" _np_pa_dtypes = {