Skip to content

Improving the performance of the System Class #16

@MaxBerktoldRWTH

Description

@MaxBerktoldRWTH

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])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions