|
|
|
@ -47,7 +47,6 @@ def select_hdr_data(
@@ -47,7 +47,6 @@ def select_hdr_data(
|
|
|
|
|
Raises: |
|
|
|
|
KeyError: if any column does not exist in the data fram |
|
|
|
|
""" |
|
|
|
|
|
|
|
|
|
check_columns_exist(data, spot_id_columns, time_column, overflow_column) |
|
|
|
|
spot_ids = ensure_list(spot_id_columns) |
|
|
|
|
|
|
|
|
@ -62,7 +61,7 @@ def select_hdr_data(
@@ -62,7 +61,7 @@ def select_hdr_data(
|
|
|
|
|
for next_higher_time in indexed_data_by_time: |
|
|
|
|
selection = hdr_data[overflow_column] |
|
|
|
|
not_in_overlow = hdr_data.loc[~selection].copy() |
|
|
|
|
replacement_for_overlow = next_higher_time[selection].copy() |
|
|
|
|
replacement_for_overlow = next_higher_time.loc[selection].copy() |
|
|
|
|
hdr_data = pandas.concat((not_in_overlow, replacement_for_overlow)) |
|
|
|
|
|
|
|
|
|
return hdr_data.reset_index() |
|
|
|
|