diff --git a/scripts/convert_backtestdata.py b/scripts/convert_backtestdata.py index 302170ca0..d93356cf6 100755 --- a/scripts/convert_backtestdata.py +++ b/scripts/convert_backtestdata.py @@ -69,7 +69,7 @@ def parse_old_backtest_data(ticker) -> DataFrame: .rename(columns=columns) if 'BV' in frame: frame.drop('BV', 1, inplace=True) - if not 'date' in frame: + if 'date' not in frame: logger.warning("Date not in frame - probably not a Ticker file") return None frame.sort_values('date', inplace=True) @@ -136,7 +136,8 @@ def convert_main(args: Namespace) -> None: if ret_integer: minutes = int(ret_integer.group(0)) - interval = str(minutes) + 'm' # default to adding 'm' to end of minutes for new interval name + # default to adding 'm' to end of minutes for new interval name + interval = str(minutes) + 'm' # but check if there is a mapping between int and string also for str_interval, minutes_interval in Constants.TICKER_INTERVAL_MINUTES.items(): if minutes_interval == minutes: