Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REVIEW] Add information about Index.is_* method deprecation #12909

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions python/cudf/cudf/core/_base_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import pandas as pd

import cudf
import warnings
from cudf._lib.copying import _gather_map_is_valid, gather
from cudf._lib.stream_compaction import (
apply_boolean_mask,
Expand Down Expand Up @@ -858,6 +859,7 @@ def is_numeric(self):
>>> idx.is_numeric()
False
"""
# TODO: Only remove this deprecation after pandas removes this API.
warnings.warn(
f"{type(self).__name__}.is_numeric is deprecated. "
"Use cudf.api.types.is_any_real_numeric_dtype instead",
Expand Down Expand Up @@ -902,6 +904,7 @@ def is_boolean(self):
>>> idx.is_boolean()
False
"""
# TODO: Only remove this deprecation after pandas removes this API.
warnings.warn(
f"{type(self).__name__}.is_boolean is deprecated. "
"Use cudf.api.types.is_bool_dtype instead",
Expand Down Expand Up @@ -946,6 +949,7 @@ def is_integer(self):
>>> idx.is_integer()
False
"""
# TODO: Only remove this deprecation after pandas removes this API.
warnings.warn(
f"{type(self).__name__}.is_integer is deprecated. "
"Use cudf.api.types.is_integer_dtype instead",
Expand Down Expand Up @@ -997,6 +1001,7 @@ def is_floating(self):
>>> idx.is_floating()
False
"""
# TODO: Only remove this deprecation after pandas removes this API.
warnings.warn(
f"{type(self).__name__}.is_floating is deprecated. "
"Use cudf.api.types.is_float_dtype instead",
Expand Down Expand Up @@ -1042,6 +1047,7 @@ def is_object(self):
>>> idx.is_object()
False
"""
# TODO: Only remove this deprecation after pandas removes this API.
warnings.warn(
f"{type(self).__name__}.is_object is deprecated. "
"Use cudf.api.types.is_object_dtype instead",
Expand Down Expand Up @@ -1094,6 +1100,7 @@ def is_categorical(self):
>>> s.index.is_categorical()
False
"""
# TODO: Only remove this deprecation after pandas removes this API.
warnings.warn(
f"{type(self).__name__}.is_categorical is deprecated. "
"Use cudf.api.types.is_categorical_dtype instead",
Expand Down Expand Up @@ -1140,6 +1147,7 @@ def is_interval(self):
>>> idx.is_interval()
False
"""
# TODO: Only remove this deprecation after pandas removes this API.
warnings.warn(
f"{type(self).__name__}.is_interval is deprecated. "
"Use cudf.api.types.is_interval_dtype instead",
Expand Down