From 187d06b5ba04fcb008f549022bd71ff2690d0139 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 13 Apr 2026 07:09:36 +0200 Subject: [PATCH] fix: use pd.notna to check for empty strings --- freqtrade/plot/plotting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/plot/plotting.py b/freqtrade/plot/plotting.py index 085a198ca..ed15c8e79 100644 --- a/freqtrade/plot/plotting.py +++ b/freqtrade/plot/plotting.py @@ -263,7 +263,7 @@ def plot_trades(fig, trades: pd.DataFrame) -> make_subplots: trades["desc"] = trades.apply( lambda row: ( f"{row['profit_ratio']:.2%}, " - + (f"{row['enter_tag']}, " if row["enter_tag"] is not None else "") + + (f"{row['enter_tag']}, " if pd.notna(row["enter_tag"]) else "") + f"{row['exit_reason']}, " + f"{row['trade_duration']} min" ),