category = pd.cut(df['category'], [0, 10, 20]) чтобы добавить в столбец df['col_category'] = pd.cut(df['col1'], [0, 10, 20])