From 1a30e39222ae73ca32247ceccea1e881a437d6ca Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 21 May 2021 08:06:27 +0200 Subject: [PATCH] Move squeeze into if block --- docs/strategy-advanced.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/strategy-advanced.md b/docs/strategy-advanced.md index f5f706cd6..52879c7b4 100644 --- a/docs/strategy-advanced.md +++ b/docs/strategy-advanced.md @@ -40,7 +40,6 @@ class AwesomeStrategy(IStrategy): !!! Note If the data is pair-specific, make sure to use pair as one of the keys in the dictionary. - ## Dataframe access You may access dataframe in various strategy functions by querying it from dataprovider. @@ -67,8 +66,8 @@ class AwesomeStrategy(IStrategy): trade_candle = dataframe.loc[dataframe['date'] == trade_date] # trade_candle may be empty for trades that just opened as it is still incomplete. if trade_candle.empty: + trade_candle = trade_candle.squeeze() # <...> - trade_candle = trade_candle.squeeze() ``` !!! Warning "Using .iloc[-1]"