Summary
Environment
- QF-Lib: 4.0.4
- Python: 3.11.9
- pandas: 2.2.3
What happened?
When running scripts that generate tearsheets, FutureWarnings are displayed:
qf-lib\qf_lib\analysis\tearsheets\portfolio_analysis_sheet.py:358: FutureWarning: Downcasting object dtype arrays on .fillna, .ffill, .bfill is deprecated and will change in a future version. Call result.infer_objects(copy=False) instead. To opt-in to the future behavior, set `pd.set_option('future.no_silent_downcasting', True)`
index=time_index).ffill().fillna(0.0)
The warning appears when ffill() or fillna() is called on object dtype arrays, which triggers automatic downcasting.
Summary
Environment
What happened?
When running scripts that generate tearsheets, FutureWarnings are displayed:
The warning appears when
ffill()orfillna()is called on object dtype arrays, which triggers automatic downcasting.