Skip to content

Commit d24c749

Browse files
committed
Updated as per comments
1 parent 49e002f commit d24c749

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pandas/core/reshape/tile.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ def cut(x, bins, right=True, labels=None, retbins=False, precision=3,
2828
"""
2929
Bin `x` and return data about the bin to which each `x` value belongs.
3030
31-
This function splits `x` into the specified number of equal-width half-
32-
open bins. Based on the parameters specified and the input, returns
33-
information about the half-open bins to which each value of `x` belongs
34-
or the bins themselves.
31+
Splits `x` into the specified number of equal-width half-open bins.
32+
Based on the parameters specified and the input, returns data about
33+
the half-open bins to which each value of `x` belongs or the bins
34+
themselves.
3535
Use `cut` when you need to segment and sort data values into bins. This
3636
function is also useful for going from a continuous variable to a
3737
categorical variable. For example, `cut` could convert ages to groups
@@ -108,7 +108,7 @@ def cut(x, bins, right=True, labels=None, retbins=False, precision=3,
108108
[good, good, good, medium, bad, good]
109109
Categories (3, object): [good < medium < bad]
110110
111-
>>> pd.cut(np.ones(5), 4, labels=False)
111+
>>> pd.cut(np.ones(5, dtype='int64'), 4, labels=False)
112112
array([1, 1, 1, 1, 1], dtype=int64)
113113
114114
>>> s = pd.Series(np.array([2,4,6,8,10]), index=['a', 'b', 'c', 'd', 'e'])

0 commit comments

Comments
 (0)