Skip to content

Commit

Permalink
using map() counts pay_per_day %time= 1min 28s
Browse files Browse the repository at this point in the history
pay转换成numpy结构plist,创建二维数组ppd,建立datemap字典映射date下标为数字下标,使用map()函数循环遍历plist计算ppd
  • Loading branch information
David-AJ committed Feb 27, 2017
1 parent e4f1488 commit b4b4459
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dataset/CleanData.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

def creatPpd(item):
global ppd,datemap
ppd[datemap[item.date]][item.sid] = ppd[datemap[item.date]][item.sid] + 1
ppd[datemap[item[2]]][item[1]-1] = ppd[datemap[item[2]]][item[1]-1] + 1

# map函数遍历plist
map(creatPpd,plist)
Expand Down

0 comments on commit b4b4459

Please sign in to comment.