@@ -343,7 +343,11 @@ class MongodbHandler:
if len(frames) > 1:
return_df = pd.concat(frames, axis=0, sort=False)
else:
- return_df = frames[0]
+ if not frames:
+ self._log.warning('Query returned empty Cursor')
+ return_df = pd.DataFrame()
+ else:
+ return_df = frames[0]
if index is not None:
return_df.set_index(index, inplace=True)