连续型特征按固定区间/分位数分箱# 价格按指定区间分箱 def price_cut_bins(s): unique_len = len(s.unique()) if unique_len>10: s= s.replace(-1,np.nan) df_bin = pd.to_numeric(pd.cut(s, bins=[0,100,200,30
Copyright © 2005-2025 51CTO.COM 版权所有 京ICP证060544号