Skip to content

Commit

Permalink
Add slope, access etc. to pairs output
Browse files Browse the repository at this point in the history
  • Loading branch information
patricoferris committed Sep 11, 2023
1 parent 06a01ab commit 9de6d35
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions methods/matching/find_pairs.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ def find_match_iteration(
match = filtered_s.iloc[min_index]

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.lat, k_row.lng] + [k_row[x] for x in luc_columns + distance_columns] + \
[match.lat, match.lng] + [match[x] for x in luc_columns + distance_columns]
)

columns = ['k_lat', 'k_lng'] + \
[f'k_{x}' for x in luc_columns] + \
[f'k_{x}' for x in luc_columns + distance_columns] + \
['s_lat', 's_lng'] + \
[f's_{x}' for x in luc_columns]
[f's_{x}' for x in luc_columns + distance_columns]

results_df = pd.DataFrame(results, columns=columns)
results_df.to_parquet(os.path.join(output_folder, f'{idx_and_seed[1]}.parquet'))
Expand Down

0 comments on commit 9de6d35

Please sign in to comment.