Use pandas.values.tolist instead of itertuples
speeds up backtesting closes #4494
This commit is contained in:
parent
bc05d03126
commit
0b81b58d28
@ -206,7 +206,7 @@ class Backtesting:
|
|||||||
|
|
||||||
# Convert from Pandas to list for performance reasons
|
# Convert from Pandas to list for performance reasons
|
||||||
# (Looping Pandas is slow.)
|
# (Looping Pandas is slow.)
|
||||||
data[pair] = [x for x in df_analyzed.itertuples(index=False, name=None)]
|
data[pair] = df_analyzed.values.tolist()
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def _get_close_rate(self, sell_row: Tuple, trade: LocalTrade, sell: SellCheckTuple,
|
def _get_close_rate(self, sell_row: Tuple, trade: LocalTrade, sell: SellCheckTuple,
|
||||||
|
Loading…
Reference in New Issue
Block a user