mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 19:28:00 +00:00
continuation of old csv and new csv file comparison
This commit is contained in:
@@ -1166,6 +1166,32 @@ class L3CXProfile(BaseProfile):
|
|||||||
raise ValueError('Filename %s does not match output format %s' % (report_file, output_format))
|
raise ValueError('Filename %s does not match output format %s' % (report_file, output_format))
|
||||||
else:
|
else:
|
||||||
output_format = report_file.split('.')[-1]
|
output_format = report_file.split('.')[-1]
|
||||||
|
#retrieve compared report if specified - turn into dataframe
|
||||||
|
if compared_report is not None:
|
||||||
|
compared_format = compared_report.split('.')[-1]
|
||||||
|
#initial dataframe
|
||||||
|
previous_data_df = pd.DataFrame()
|
||||||
|
if compared_format == 'hdf':
|
||||||
|
#df.to_hdf(report_file, 'table', append=True)
|
||||||
|
continue
|
||||||
|
if compared_format == 'parquet':
|
||||||
|
#df.to_parquet(report_file, engine='pyarrow')
|
||||||
|
continue
|
||||||
|
if compared_format == 'png':
|
||||||
|
#fig = df.plot().get_figure()
|
||||||
|
#fig.savefig(report_file)
|
||||||
|
continue
|
||||||
|
if compared_format.lower() in ['excel', 'xlsx'] or report_file.split('.')[-1] == 'xlsx':
|
||||||
|
continue
|
||||||
|
if compared_format == 'df':
|
||||||
|
#return df
|
||||||
|
continue
|
||||||
|
supported_formats = ['csv', 'json', 'stata', 'pickle','html']
|
||||||
|
for format in supported_formats:
|
||||||
|
if compared_format.lower() == format:
|
||||||
|
# exec('df.to_' + x + '("' + report_file + '",index=False' + ')')
|
||||||
|
previous_data_df= read_csv()
|
||||||
|
|
||||||
|
|
||||||
# Step 1, column names
|
# Step 1, column names
|
||||||
fields=None
|
fields=None
|
||||||
|
|||||||
@@ -168,7 +168,8 @@ python3 ./test_ipv4_variable_time.py
|
|||||||
--b_min 1000
|
--b_min 1000
|
||||||
--ap "00:0e:8e:78:e1:76"
|
--ap "00:0e:8e:78:e1:76"
|
||||||
--output_format csv
|
--output_format csv
|
||||||
--report_file ~/Documents/results.csv (if csv file - please use another extension for other files)
|
--report_file ~/Documents/results.csv (Example of csv file output - please use another extension for other files)
|
||||||
|
--compared_report ~/Documents/results_prev.csv (Example of csv file retrieval - please use another extension for other files)
|
||||||
--debug
|
--debug
|
||||||
''')
|
''')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user