mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2026-03-20 03:41:40 +00:00
start of comparison of 2 dataframes
This commit is contained in:
@@ -641,8 +641,14 @@ class LFCliBase:
|
||||
#takes any format of a file and returns a dataframe of it
|
||||
def file_to_df(self,file_name):
|
||||
return pd.read_csv(file_name)
|
||||
|
||||
#get difference of all common columns in 2 dataframes. store in
|
||||
def compare_two_df(self,dataframe_one=None,dataframe_two=None):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
pass
|
||||
#return compared_df
|
||||
|
||||
|
||||
@@ -1319,10 +1319,11 @@ class L3CXProfile(LFCliBase):
|
||||
time.sleep(monitor_interval_ms)
|
||||
csvfile.close()
|
||||
|
||||
#here, do column manipulations
|
||||
#comparison to last report / report inputted
|
||||
if compared_report is not None:
|
||||
pass
|
||||
#df to final report file output
|
||||
compared_report_completed=self.compare_two_df(pd.read_csv(report_file), pd.read_csv(compared_report))
|
||||
|
||||
#df to final report file output if necessary
|
||||
if output_format.lower() != 'csv':
|
||||
dataframe_output = pd.read_csv(report_file)
|
||||
self.df_to_file(dataframe=dataframe_output, output_f=output_format)
|
||||
|
||||
@@ -142,7 +142,7 @@ def main():
|
||||
optional.append({'name': '--layer3_cols', 'help': 'Columns wished to be monitored from layer 3 endpoint tab',
|
||||
'default': ['name', 'tx bytes', 'rx bytes']})
|
||||
optional.append({'name': '--port_mgr_cols', 'help': 'Columns wished to be monitored from port manager tab',
|
||||
'default': ['ap', 'ip', 'rx bytes']})
|
||||
'default': ['ap', 'ip', 'parent dev']})
|
||||
optional.append(
|
||||
{'name': '--compared_report', 'help': 'report path and file which is wished to be compared with new report',
|
||||
'default': None})
|
||||
|
||||
Reference in New Issue
Block a user