Skip to content

Commit 0f23760

Browse files
8th update for issue 3439
1 parent 511cc77 commit 0f23760

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

pandas/core/reshape/tile.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,11 @@ def cut(x, bins, right=True, labels=None, retbins=False, precision=3,
7575
Examples
7676
--------
7777
>>> pd.cut(np.array([.2, 1.4, 2.5, 6.2, 9.7, 2.1]), 3, retbins=True)
78-
([(0.191, 3.367], (0.191, 3.367], (0.191, 3.367], (3.367, 6.533],
79-
(6.533, 9.7], (0.191, 3.367]]
80-
Categories (3, object): [(0.191, 3.367] < (3.367, 6.533] < (6.533, 9.7]],
81-
array([ 0.1905 , 3.36666667, 6.53333333, 9.7 ]))
78+
([(0.19, 3.367], (0.19, 3.367], (0.19, 3.367], (3.367, 6.533], (6.533, 9.7], (0.19, 3.367]]
79+
Categories (3, interval[float64]): [(0.19, 3.367] < (3.367, 6.533] < (6.533, 9.7]], array([ 0.1905 , 3.36666667, 6.53333333, 9.7 ]))
8280
83-
>>> pd.cut(np.array([.2, 1.4, 2.5, 6.2, 9.7, 2.1]), 3,
84-
labels=["good","medium","bad"])
81+
>>> result, bins = pd.cut(np.array([.2, 1.4, 2.5, 6.2, 9.7, 2.1]),
82+
... 3, labels=["good","medium","bad"])
8583
[good, good, good, medium, bad, good]
8684
Categories (3, object): [good < medium < bad]
8785

0 commit comments

Comments
 (0)