[Issue-Id:RICAPP-155]Code changes to support for JJB and Unit testing for AD xApp
[ric-app/ad.git] / ad / ad_model / tb_format.py
index 91f3c08..8116616 100644 (file)
 
 import pandas as pd
 from ad_model.processing import preprocess
 
 import pandas as pd
 from ad_model.processing import preprocess
-import json, datetime
+import datetime
+
+UEKeyList = ['MeasTimestampRF', 'UEPDCPBytesDL', 'UEPDCPBytesUL', 'UEPRBUsageDL', 'UEPRBUsageUL', 'S_RSRP', 'S_RSRQ', 'S_SINR', 'UEID']
 
 
-UEKeyList = ['MeasTimestampRF','UEPDCPBytesDL', 'UEPDCPBytesUL', 'UEPRBUsageDL', 'UEPRBUsageUL','S_RSRP', 'S_RSRQ', 'S_SINR','UEID']
 
 def parse(df):
     """
       This block will be modified when we are going to fetch the data from database via sdl api.
 
 def parse(df):
     """
       This block will be modified when we are going to fetch the data from database via sdl api.
-
       start the preprocessing, processing steps using the keycolumns
       populates the current timestamp value for MeasTimestampRF
     """
       start the preprocessing, processing steps using the keycolumns
       populates the current timestamp value for MeasTimestampRF
     """
@@ -32,5 +32,5 @@ def parse(df):
     db = preprocess(df)
     df = db.process()
     del db
     db = preprocess(df)
     df = db.process()
     del db
-    df['MeasTimestampRF'] = pd.date_range(start = datetime.datetime.now(), periods = len(df), freq = '-10ms')
+    df['MeasTimestampRF'] = pd.date_range(start=datetime.datetime.now(), periods=len(df), freq='-10ms')
     return df
     return df