Skip to content

Commit

Permalink
solve merge data for ablassion
Browse files Browse the repository at this point in the history
  • Loading branch information
YukiYang31 committed Oct 29, 2023
1 parent 17f03cb commit d0e3ff7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/experiments/function_calls/summer2023_tests/mergeData.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
rapc_df['graph_name'] = getrgfapc_df['graph_name']
rapc_df = rapc_df.fillna('na')

fcapc_df = pd.DataFrame(columns = ['graph_name','fcapc','fcapc_time'])
fcapc_df = pd.DataFrame(columns = ['graph_name','fcapc','fcapc_time', 'naiveMathTime','naiveFirstHalfTime'])
fcapc_df['graph_name'] = getrgfapc_df['graph_name']
fcapc_df = fcapc_df.fillna('na')
#############################################
Expand All @@ -32,14 +32,16 @@
rapc_df = rapc_df.iloc[:,1:] #drop first column
if os.path.exists(fcapc_csv_file_path):
df = pd.read_csv(fcapc_csv_file_path)
df.rename(columns = {'firstHalfTime':'naiveFirstHalfTime'}, inplace = True)
if df['graph_name'].equals(getrgfapc_df['graph_name']):
fcapc_df = df
fcapc_df = fcapc_df.iloc[:,1:]
print(fcapc_df)

merge1 = pd.merge(rapc_df,fcapc_df)
mergefinal = pd.merge(merge1, getrgfapc_df)

new_order = ['graph_name','rapc','fcapc','getrgfapc','rapc_time','fcapc_time','getrgfapc_time','longest for getrgf','longest time','case','gamma']
new_order = ['graph_name','rapc','fcapc','getrgfapc','rapc_time','fcapc_time','getrgfapc_time','firstHalfTime','naiveFirstHalfTime','naiveMathTime','getrgfTime','longest for getrgf','longest time','case','gamma']
mergefinal = mergefinal[new_order]

print('=========================printing final data table=================================')
Expand Down

0 comments on commit d0e3ff7

Please sign in to comment.