Skip to content

Commit

Permalink
Added deprecation warning for .label_encoding() (#9289)
Browse files Browse the repository at this point in the history
This PR addresses issue #8608 by adding a deprecation warning before we remove the functionality entirely.

Authors:
  - Mayank Anand (https://github.com/mayankanand007)

Approvers:
  - Ashwin Srinath (https://github.com/shwina)

URL: #9289
  • Loading branch information
mayankanand007 authored Sep 24, 2021
1 parent 8d4c523 commit 20498f7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/cudf/cudf/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -3637,6 +3637,12 @@ def label_encoding(self, cats, dtype=None, na_sentinel=-1):
dtype: int8
"""

warnings.warn(
"Series.label_encoding is deprecated and will be removed in the future.\
Consider using cuML's LabelEncoder instead",
DeprecationWarning,
)

def _return_sentinel_series():
return Series(
cudf.core.column.full(
Expand Down

0 comments on commit 20498f7

Please sign in to comment.