浏览代码

Small bug fix for print out

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

+ 2 - 2
cdplib/FlattenData.py

@@ -20,7 +20,7 @@ class FlattenData():
     def __init__(self):
         self._log = Log("Flatten data")
     
-    def flatten(self, data):
+    def flatten(self, data) -> pd.DataFrame():
         '''
         :parm data: data given in either dictionary, list or dataframe format.
         '''
@@ -40,7 +40,7 @@ class FlattenData():
             return None
 
         result_dataframe = pd.DataFrame.from_dict(return_data, orient='index')
-        self._log.info(('Data has been flattened, created {} columns in {} seconds').format(len(return_data.columns)- len(data.columns), time.time()-start))
+        self._log.info(('Data has been flattened, created {} columns in {} seconds').format(len(result_dataframe.columns)- len(data.columns), time.time()-start))
         return result_dataframe
 
     def flatten_dataframe(self, dataframe: pd.DataFrame, incoming_key: str = None):