mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 02:12:01 +00:00
trim_dataframe should enforce kwargs for non-required arguments
This commit is contained in:
parent
9bfe96d4d6
commit
4369e3cdeb
|
@ -122,7 +122,7 @@ def ohlcv_fill_up_missing_data(dataframe: DataFrame, timeframe: str, pair: str)
|
|||
return df
|
||||
|
||||
|
||||
def trim_dataframe(df: DataFrame, timerange, df_date_col: str = 'date',
|
||||
def trim_dataframe(df: DataFrame, timerange, *, df_date_col: str = 'date',
|
||||
startup_candles: int = 0) -> DataFrame:
|
||||
"""
|
||||
Trim dataframe based on given timerange
|
||||
|
|
|
@ -84,7 +84,7 @@ def init_plotscript(config, markets: List, startup_candles: int = 0):
|
|||
except ValueError as e:
|
||||
raise OperationalException(e) from e
|
||||
if not trades.empty:
|
||||
trades = trim_dataframe(trades, timerange, 'open_date')
|
||||
trades = trim_dataframe(trades, timerange, df_date_col='open_date')
|
||||
|
||||
return {"ohlcv": data,
|
||||
"trades": trades,
|
||||
|
|
Loading…
Reference in New Issue
Block a user