一.pd.cut()与pd.qcut()的区别 假设有一组人员数据,而你希望将它们划分为不同的年龄组 ages = [18,20,22,25,27,21,23,37,31,61,45,32] bins = [18,25,35,60,100] cats = pd.cut(ages, bins)#将ages中的每个元素划分到bins组内 cats ''' [NaN, (18, 25], (18, 25], (18, 25], (25, 35], ..., (35, 60], (25, 35], (6