continuation of old csv and new csv file comparison

This commit is contained in:
Dipti
2021-01-27 15:10:57 -08:00
parent ab851dba7c
commit f5b1fae73e
2 changed files with 28 additions and 1 deletions

View File

@@ -1166,6 +1166,32 @@ class L3CXProfile(BaseProfile):
raise ValueError('Filename %s does not match output format %s' % (report_file, output_format))
else:
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
fields=None

View File

@@ -168,7 +168,8 @@ python3 ./test_ipv4_variable_time.py
--b_min 1000
--ap "00:0e:8e:78:e1:76"
--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
''')