Skip to content

Commit

Permalink
add remove station function
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-urban committed Jan 20, 2025
1 parent 143dc45 commit f5c24d8
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,15 @@ def add_param(self, name, times, param, step=1):
self.__data[name] = parameter
self.__data = self.__data.copy()

def remove_station(self, pm, station):
processor = deepcopy(self)
t0 = pm.get_start_time(station)
t1 = pm.get_end_time(station)
processor.__data = processor.__data[processor.__data.index < t0]
pd.concat([processor.__data, self.__data[self.__data.index > t1]])

return processor

def split_per_station(self, pm):
processor_per_station = {}

Expand Down

0 comments on commit f5c24d8

Please sign in to comment.