I/O¶
Excel exporter¶
fantasyfb.io.excel_exporter.FantasyExcelExporter ¶
Handles Excel export with formatting for fantasy football data.
Initialize Excel writer and formatting.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output_path
|
str
|
Full path to output Excel file |
required |
export_rosters ¶
Export rosters with WAR conditional formatting.
export_available ¶
Export available players with WAR conditional formatting.
export_schedule ¶
Export schedule with win probability formatting.
export_standings ¶
Export standings with playoff probability formatting.
export_analysis ¶
Export analysis results (pickups, adds, drops, trades).
export_deltas ¶
Export per-game deltas with full conditional formatting.
HTML exporter¶
fantasyfb.io.html_exporter.FantasyHtmlExporter ¶
FantasyHtmlExporter(output_path: str, week: int, me: str, sims: Optional[int] = None, day: Optional[str] = None, platform: str = 'Yahoo', bestball: bool = False, drop_safe_threshold: float = -4.0, drop_depth_threshold: float = -12.0)
Collects fantasy football DataFrames and writes one interactive HTML report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output_path
|
str
|
Full path to the output .html file |
required |
week
|
int
|
Current NFL week |
required |
me
|
str
|
Name of the user's own fantasy team (the report's default view) |
required |
sims
|
Optional[int]
|
Number of Monte Carlo simulations behind the numbers |
None
|
day
|
Optional[str]
|
Weekday label shown in the header (e.g. "Wednesday") |
None
|
platform
|
str
|
Fantasy platform name shown in the footer |
'Yahoo'
|
bestball
|
bool
|
Whether the report is for a best ball run |
False
|
drop_safe_threshold
|
float
|
A drop whose expected-earnings delta is above this value gets the "Safe to cut" verdict |
-4.0
|
drop_depth_threshold
|
float
|
Above this (but not above the safe threshold) gets "Depth"; anything lower is "Keep" |
-12.0
|
export_available ¶
Collect available (free agent) players.
export_analysis ¶
Collect an analysis table ("Adds", "Pickups", "Drops" or "Trades").
freeze_cols is accepted for signature parity with the Excel
exporter and ignored.
export_deltas ¶
Collect per-game deltas (the --deltas rooting guide).
deltas_df is the frame returned by League.perGameDelta: one row
per hypothetical winner (winner column), one column per team holding
that team's change in expected earnings if that winner wins.