python技巧

pandas分位数

xs.groupby(pd.qcut(xs, 5))

 

生成日期,字符串左补0函数zfill

[str(y)+'-'+str(m).zfill(2) for y in range(2006,2016) for m in range(1, 13)]

posted @ 2017-01-11 11:14  2714  阅读(64)  评论(0)    收藏  举报