📅  最后修改于: 2022-03-11 14:47:24.439000             🧑  作者: Mango
\
df['quantile_ex_4'] = pd.qcut(df['ext price'],
q=[0, .2, .4, .6, .8, 1], #quartiles bin range will vary
labels=False, #returns integers as categories
precision=0)
df.head()
#all bins will have roughly same no. of observation