Skip to content

Commit

Permalink
heed pandas warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate-Wessel committed Jul 9, 2024
1 parent f290d96 commit 2e4dd42
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/app/get_travel_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ def get_travel_time(start_node, end_node, start_time, end_time, start_date, end_
# filter out hours with too much missing data
observations = hr_sums[ hr_sums['length'] / total_corridor_length >= 0.8 ]
# extrapolate over missing data within each hour
observations['tt_extrapolated'] = observations['tt'] * total_corridor_length / observations['length']
observations = observations.assign(
tt_extrapolated = lambda r: r.tt * total_corridor_length / r.length
)
# convert to format that can be used by the same summary function
sample = []
for tup in observations.itertuples():
Expand Down

0 comments on commit 2e4dd42

Please sign in to comment.