Move df append to pd concat
This commit is contained in:
parent
7b02114ad2
commit
580da21dda
3
freqtrade/optimize/backtesting.py
Normal file → Executable file
3
freqtrade/optimize/backtesting.py
Normal file → Executable file
@ -10,6 +10,7 @@ from datetime import datetime, timedelta, timezone
|
|||||||
from typing import Any, Dict, List, Optional, Tuple
|
from typing import Any, Dict, List, Optional, Tuple
|
||||||
|
|
||||||
from numpy import nan
|
from numpy import nan
|
||||||
|
import pandas as pd
|
||||||
from pandas import DataFrame
|
from pandas import DataFrame
|
||||||
|
|
||||||
from freqtrade import constants
|
from freqtrade import constants
|
||||||
@ -1093,7 +1094,7 @@ class Backtesting:
|
|||||||
for t, v in pairresults.open_date.items():
|
for t, v in pairresults.open_date.items():
|
||||||
allinds = pairdf.loc[(pairdf['date'] < v)]
|
allinds = pairdf.loc[(pairdf['date'] < v)]
|
||||||
signal_inds = allinds.iloc[[-1]]
|
signal_inds = allinds.iloc[[-1]]
|
||||||
signal_candles_only_df = signal_candles_only_df.append(signal_inds)
|
signal_candles_only_df = pd.concat([signal_candles_only_df, signal_inds])
|
||||||
|
|
||||||
signal_candles_only[pair] = signal_candles_only_df
|
signal_candles_only[pair] = signal_candles_only_df
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user