|
@@ -320,13 +320,13 @@ class MongodbHandler:
|
|
if index % chunksize == 0:
|
|
if index % chunksize == 0:
|
|
frames.append(pd.DataFrame(records))
|
|
frames.append(pd.DataFrame(records))
|
|
records = []
|
|
records = []
|
|
-
|
|
|
|
|
|
+
|
|
if records:
|
|
if records:
|
|
frames.append(pd.DataFrame(records))
|
|
frames.append(pd.DataFrame(records))
|
|
return_df = pd.concat(frames, axis=0, sort=False)
|
|
return_df = pd.concat(frames, axis=0, sort=False)
|
|
|
|
|
|
if index is not None:
|
|
if index is not None:
|
|
- df.set_index(index, inplace=True)
|
|
|
|
|
|
+ return_df.set_index(index, inplace=True)
|
|
|
|
|
|
self._log.info(('{} Rows were fetched from {}. DataFrame conversion is done, took {} seconds').format(len(return_df.index), collection_name if collection_name is not None else 'the database', time.time()-start_time))
|
|
self._log.info(('{} Rows were fetched from {}. DataFrame conversion is done, took {} seconds').format(len(return_df.index), collection_name if collection_name is not None else 'the database', time.time()-start_time))
|
|
|
|
|