1 parent b0c5770 commit 35e16eaCopy full SHA for 35e16ea
1 file changed
src/quanteval/core/backtester.py
@@ -314,7 +314,8 @@ def __repr__(self) -> str:
314
available_cols = [c for c in cols_map.keys() if c in summary_df.columns]
315
316
if available_cols:
317
- display_df = cast(pd.DataFrame, summary_df[available_cols].copy())
+ # Ensure we can assign formatted string values into the frame
318
+ display_df = cast(pd.DataFrame, summary_df[available_cols].copy()).astype(object)
319
for c in available_cols:
320
fmt = cols_map[c][1]
321
column = cast(pd.Series, display_df[c])
0 commit comments