-
Notifications
You must be signed in to change notification settings - Fork 6
Improving the performance of the System Class #16
Description
At the moment pandas.DataFrame.loc ist used to set values in the timeseries dataframe.
This is very slow and should be replaced by .at() or .iat().
pandas.DataFrame.loc : Access a group of rows and columns by label(s) or a boolean array.
pandas.DataFrame.at : Access a single value for a row/column label pair.
pandas.DataFrame.at : Access a single value for a row/column label pair.
For iat() the column and row index must be known. According changes must be made in the run function.
Also to call the controller the line controls, additional_columns = controller(df.loc[df.index <= idx]) is used.
This is also quite slow due to extensive comparisons, especially when dealing with long indices.
This should be replaced by: controls = controller(df.iloc[:row_idx+1])