Skip to content

Commit 355e569

Browse files
committed
allowing datetime and timedelta datatype in pd cut bins
1 parent f79bc7a commit 355e569

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pandas/tools/tile.py

+1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def cut(x, bins, right=True, labels=None, retbins=False, precision=3,
116116

117117
else:
118118
bins = np.asarray(bins)
119+
bins, bin_dtype = _coerce_to_type(bins)
119120
if (np.diff(bins) < 0).any():
120121
raise ValueError('bins must increase monotonically.')
121122

0 commit comments

Comments
 (0)