split age into ten bins python code example Example: pd.cut in pandas >>> pd.qcut(range(5), 4, labels=False) array([0, 0, 1, 2, 3])