Repository navigation
Commit dedaa98
committed
[polars] Fetch the FRED CSV with requests before parsing it
polars 2.0.0 (2026-10-06) reads a URL through its object store: it
sends a HEAD request for the file size, then ranged GETs. FRED's
fredgraph.csv answers HEAD with Content-Length: 0 (the body is ~14 kB),
and polars 2.0 then stalls instead of erroring. The lecture installs
the newest polars, so the FRED cell has hung until the 600 s cell
timeout since the release, failing the weekly cache build on
2026-10-12 (it passed on 2026-10-05).
Download the file with requests and pass the bytes to pl.read_csv.
This reads the same 918 rows with the date column parsed under both
polars 1.44.2 and 2.0.0. The sentence above the cell no longer says
read_csv fetches the URL itself.
All 52 code cells of the lecture run under polars 2.0.0 with live FRED
and Yahoo Finance data.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wyb6EzbNzY5a8uuJPnDtUb1 parent 85586e6 commit dedaa98
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
547 | | - | |
| 547 | + | |
| 548 | + | |
548 | 549 | | |
549 | 550 | | |
550 | 551 | | |
| |||
564 | 565 | | |
565 | 566 | | |
566 | 567 | | |
567 | | - | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
568 | 572 | | |
569 | 573 | | |
570 | 574 | | |
| |||
0 commit comments