From 038af3387c8a55c7b394e1ce90b304e024e4b285 Mon Sep 17 00:00:00 2001 From: Patrick Ferris Date: Thu, 7 Sep 2023 10:40:47 +0100 Subject: [PATCH] Add slope, access etc. to pairs output --- methods/matching/find_pairs.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/methods/matching/find_pairs.py b/methods/matching/find_pairs.py index 52f58c8..0d04e29 100644 --- a/methods/matching/find_pairs.py +++ b/methods/matching/find_pairs.py @@ -104,11 +104,15 @@ def find_match_iteration( results.append( [k_row.lat, k_row.lng] + [k_row[x] for x in luc_columns] + \ - [match.lat, match.lng] + [match[x] for x in luc_columns] + [k_row[x] for x in distance_columns] + \ + [match.lat, match.lng] + [match[x] for x in luc_columns] + \ + [match[x] for x in distance_columns] ) columns = ['k_lat', 'k_lng'] + [f'k_{x}' for x in luc_columns] + \ - ['s_lat', 's_lng'] + [f's_{x}' for x in luc_columns] + [f'k_{x}' for x in distance_columns] + \ + ['s_lat', 's_lng'] + [f's_{x}' for x in luc_columns] + \ + [f's_{x}' for x in distance_columns] results_df = pd.DataFrame(results, columns=columns) results_df.to_parquet(os.path.join(output_folder, f'{idx_and_seed[1]}.parquet'))