bounds = np.array(periods.to_timestamp(how='start'), dtype='int')
cut = pd.cut(np.array(dts, dtype='int'), bins=bounds, right=right)
cut.levels = periods[:-1].format()
return cut
What's the equivalent of cut/qcut for pandas date fields?