#设置切分区域
listBins = [0, 10, 20, 30, 40, 50, 60, 500]
#设置切分后对应标签
listLabels = ['0','1','2','3','4','5','6']
movie_s_pd['fenzu'] = pd.cut(movie_s_pd['danjia'], bins=listBins, labels=listLabels, include_lowest=True)
labels 比bins 少1
#设置切分区域
listBins = [0, 10, 20, 30, 40, 50, 60, 500]
#设置切分后对应标签
listLabels = ['0','1','2','3','4','5','6']
movie_s_pd['fenzu'] = pd.cut(movie_s_pd['danjia'], bins=listBins, labels=listLabels, include_lowest=True)
labels 比bins 少1