python快速读取大数据1

 1 rd = pd.read_csv(path7 + u'0501-0914.csv',encoding = 'gbk',iterator = True)
 2 loop =True
 3 dflst = []
 4 i = 0
 5 while loop:
 6     try:
 7         i+=1
 8         df0 = rd.get_chunk(50000)
 9         dflst.append(df0)
10     except StopIteration:
11         loop = False
12 #        print 'stop'
13 df = pd.concat(dflst,ignore_index =True)

猜你喜欢

转载自www.cnblogs.com/lyf136686029/p/9928255.html