ソースを参照

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):