You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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])
The text was updated successfully, but these errors were encountered:
I further investigated the performance of pandas Dataframes. Turns out realtime manipulation of single values is very slow in comparison.
We should consider moving to numpy.ndarray's
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])
The text was updated successfully, but these errors were encountered: