浏览代码

Trying to speed up convert mongo into dataframe

ogert 4 年之前
父节点
当前提交
b0b6e5902f
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      cdplib/db_handlers/MongodbHandler.py

+ 2 - 2
cdplib/db_handlers/MongodbHandler.py

@@ -314,10 +314,10 @@ class MongodbHandler:
         '''
         frames = []
         records = []
-        for index, value in enumerate(data):
+        for iteration, value in enumerate(data):
 
             records.append(value)
-            if index % chunksize == 0:
+            if iteration % chunksize == 0:
                 frames.append(pd.DataFrame(records))
                 records = []