Skip to content

Commit 4ab97b5

Browse files
committed
made suggested changes
1 parent 4359cd0 commit 4ab97b5

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

doc/source/whatsnew/v1.4.0.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ Other enhancements
4343

4444
Notable bug fixes
4545
~~~~~~~~~~~~~~~~~
46-
47-
These are bug fixes that might have notable behavior changes.
46+
- Bug in :meth:`pandas.cut` on :class:`Series` with duplicate indices (:issue:`42185`) and non-exact :meth:`pandas.CategoricalIndex` (:issue:`42425`)
4847

4948
.. _whatsnew_140.notable_bug_fixes.notable_bug_fix1:
5049

pandas/core/reshape/tile.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
Timestamp,
1414
)
1515
from pandas._libs.lib import infer_dtype
16-
from pandas._typing import AnyArrayLike
1716

1817
from pandas.core.dtypes.common import (
1918
DT64NS_DTYPE,
@@ -45,7 +44,7 @@
4544

4645

4746
def cut(
48-
x: AnyArrayLike,
47+
x,
4948
bins,
5049
right: bool = True,
5150
labels=None,
@@ -384,7 +383,7 @@ def qcut(
384383

385384

386385
def _bins_to_cuts(
387-
x: AnyArrayLike,
386+
x,
388387
bins: np.ndarray,
389388
right: bool = True,
390389
labels=None,
@@ -394,9 +393,6 @@ def _bins_to_cuts(
394393
duplicates: str = "raise",
395394
ordered: bool = True,
396395
):
397-
"""
398-
Allots bins to each item in `x`
399-
"""
400396
if not ordered and labels is None:
401397
raise ValueError("'labels' must be provided if 'ordered = False'")
402398

0 commit comments

Comments
 (0)