Skip to content

Commit 256f704

Browse files
committed
Sort pandas index before update
1 parent 842e9ce commit 256f704

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

data/src/utils/times.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ def _binary_search(
492492

493493
except Exception as e:
494494
if print_log:
495-
self.config.logger.error(f"{e}. Backing off and retrying...")
495+
self.config.logger.error(f"{e}. Starting binary search...")
496496
mo = (o_start_idx + o_end_idx) // 2
497497
md = (d_start_idx + d_end_idx) // 2
498498
return (
@@ -536,8 +536,10 @@ def get_times(self) -> pd.DataFrame:
536536
]
537537
)
538538
else:
539-
results_df = pd.concat(results, ignore_index=True).set_index(
540-
["origin_id", "destination_id"]
539+
results_df = (
540+
pd.concat(results, ignore_index=True)
541+
.set_index(["origin_id", "destination_id"])
542+
.sort_index()
541543
)
542544
del results
543545
return results_df

0 commit comments

Comments
 (0)