Improve some more pct formattings

This commit is contained in:
Matthias
2021-11-11 15:58:30 +01:00
parent 4eb9038358
commit e0fd880c11
6 changed files with 11 additions and 11 deletions

View File

@@ -192,7 +192,7 @@ def plot_trades(fig, trades: pd.DataFrame) -> make_subplots:
# Trades can be empty
if trades is not None and len(trades) > 0:
# Create description for sell summarizing the trade
trades['desc'] = trades.apply(lambda row: f"{round(row['profit_ratio'] * 100, 1)}%, "
trades['desc'] = trades.apply(lambda row: f"{row['profit_ratio']:.2%}, "
f"{row['sell_reason']}, "
f"{row['trade_duration']} min",
axis=1)