Skip to content

Commit 187d06b

Browse files
committed
fix: use pd.notna to check for empty strings
1 parent 2023268 commit 187d06b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

freqtrade/plot/plotting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def plot_trades(fig, trades: pd.DataFrame) -> make_subplots:
263263
trades["desc"] = trades.apply(
264264
lambda row: (
265265
f"{row['profit_ratio']:.2%}, "
266-
+ (f"{row['enter_tag']}, " if row["enter_tag"] is not None else "")
266+
+ (f"{row['enter_tag']}, " if pd.notna(row["enter_tag"]) else "")
267267
+ f"{row['exit_reason']}, "
268268
+ f"{row['trade_duration']} min"
269269
),

0 commit comments

Comments
 (0)