python快速读取大数据

rd = pd.read_csv(path7 + u'0501-0914.csv',encoding = 'gbk',iterator = True)
loop =True
dflst = []
i = 0
while loop:
    try:
        i+=1
        df0 = rd.get_chunk(50000)
        dflst.append(df0)
    except StopIteration:
        loop = False
#        print 'stop'
df = pd.concat(dflst,ignore_index =True)

转载于:https://www.cnblogs.com/lyf136686029/p/9768616.html

你可能感兴趣的:(python快速读取大数据)