Repository navigation
pandas_datareader is maintained again (0.11.0/0.11.1, June 2026) — reconsider it as the builder-side entry point for dynamic data #26
Description
What changed
pandas-datareader had been effectively unmaintained since 0.10.0 in July 2021. That is no longer true — two releases landed in June 2026:
| Version | Date | What |
|---|---|---|
| 0.11.0 | 2026-06-23 | pandas 3 compatibility; new pandas_datareader.macro API |
| 0.11.1 | 2026-06-24 | fix to OECDReader for large mostly-empty frames |
Two parts of 0.11.0 matter here.
pandas 3 compatibility. It vendored deprecate_kwarg to drop the dependency on the private pandas.util._decorators module — the exact failure recorded in QuantEcon/lecture-python.myst#924, which blocked the anaconda 2026.06 upgrade. That incompatibility was the concrete reason the package was on its way out.
A unified macro API. 0.11.0 adds pandas_datareader.macro, described in the release notes as providing "unified access to FRED, Eurostat, and OECD macro datasets via read_macro, search_macro_datasets, and describe_*".
Why this is a question for this repo
The second point is a candidate answer to something PLAN Phase 5 and Phase 8 P4 already need: a single consistent fetch layer for dynamic macro series, living in a builder rather than in lecture notebooks.
Phase 8 P4 is UNRATE — "consumed today by 4 lectures across 3 repos via 2 access methods" — and it is the pilot that establishes the dynamic template plus the documented live-call ↔ snapshot switch. pandas_datareader.macro covers FRED, Eurostat and OECD behind one interface, which would make a builder's fetch stage uniform across sources instead of one client per source.
Note the direction this implies: pandas_datareader moves out of lecture runtime and into scripts/. As a builder dependency it runs on a cadence, its failures surface in the Phase 5 sources-alive canary instead of in seven lecture repos' CI — which is exactly the relocation Phase 5 sets out to achieve — and lectures read a stable URL.
Current usage, for the record
Ten published lectures across four repos reference it. Six genuinely use it; four carry an install line they never import — see the note below the table.
| Repo | Lecture | Reference | Used? |
|---|---|---|---|
lecture-python.myst |
unemployment_linear |
!pip install pandas_datareader; from pandas_datareader import data as web |
yes |
lecture-python.myst |
unemployment_shocks |
combined !pip install numpyro jax pandas_datareader arviz; same import |
yes |
lecture-python.myst |
phillips_lost_conquest |
!pip install pandas_datareader; same import |
yes |
lecture-python.myst |
phillips_two_stories |
!pip install pandas_datareader; same import |
yes |
lecture-python-intro |
business_cycle |
!pip install pandas-datareader; import pandas_datareader.data as web, alongside wbgapi |
yes |
lecture-python-intro |
networks |
!pip install pandas-datareader only |
no |
lecture-python-intro |
input_output |
!pip install pandas-datareader only |
no |
lecture-python-advanced.myst |
doubts_or_variability |
!pip install pandas-datareader only |
no |
lecture-datascience.myst |
tools/classification |
import pandas_datareader.data as web (pip dep in environment.yml) |
yes |
lecture-datascience.myst |
tools/visualization_rules |
from pandas_datareader import DataReader (same) |
yes |
Four of the ten are vestigial installs — networks, input_output and doubts_or_variability install the package and never import it. doubts_or_variability is the instructive one: a comment at line 2013 records that it deliberately avoids pandas-datareader by reading FRED's CSV endpoint directly, so the migration was done and only the install line was left behind. These four can be deleted with no code change, independent of whatever is decided below.
Of the six real usages, five are FRED readers. business_cycle is the one already half-migrated to wbgapi, and is also the lecture behind this repo's single existing dynamic snapshot (business_cycle_data.csv).
lecture-python.myst and lecture-python-intro are both on anaconda=2026.07 (pandas 3.x), and all four lecture-python.myst pages publish clean with no tracebacks — consistent with 0.11.0 working under pandas 3. lecture-datascience.myst is still on anaconda=2024.06 and carries pandas-datareader as an explicit pip dependency in environment.yml.
Questions
- Does
pandas_datareader.macrobecome the standard fetch layer for dynamic snapshots, or do we keep per-source clients (wbgapi,fredapi) and treat this as one option among several? - Should P4's
UNRATEbuilder be written against it, making the pilot the test of this decision? - Does the live-call ↔ snapshot switch keep a live
pandas_datareaderpath available inside lectures at all, or is snapshot-only the target?
Related
- [deprecate] update package or remove the use of pandas_datareader across all QuantEcon projects meta#160 — the standing "deprecate or remove
pandas_datareader" issue. Its premise, that the package "last received a release update in 2021 and the current maintainer is not inclined to maintain the readers", is now out of date; it should be re-read against this before anyone acts on it - Accessing Data using Python meta#89 — closed as not planned; this carries forward the data-access question it raised
- pandas 3.0 (anaconda 2026.06) breaks hansen_singleton lectures via pandas-datareader lecture-python.myst#924 — the pandas 3 breakage that 0.11.0 fixes
- MAINT: fix FutureWarning and remove pandas_datareader lecture-python-programming#341 — removed
pandas_datareaderin favour ofwbgapi(merged 2025-03-12), on the "not receiving updates" rationale
Activity
mmcky commentedon Jul 29, 2026
Correction to the inventory above. The table originally said seven lectures across three repos. It is ten across four — the first pass searched for
pandas_datareader(underscore) and missed the lectures that write it hyphenated in their!pip installline. The body has been updated; the three additions arenetworksandinput_outputinlecture-python-intro, anddoubts_or_variabilityinlecture-python-advanced.myst, a repo previously reported as clean.The correction sharpens rather than weakens the case. Four of the ten never import the package at all — they only install it.
doubts_or_variabilityis the clearest case: a comment in that lecture records that it deliberately avoidspandas-datareaderin favour of FRED's CSV endpoint, so the migration already happened there and only the install line survives. Those four lines can be removed with no code change and no dependency on the questions below.mmcky commentedon Aug 6, 2026
Recommendation: split this into three questions — one is free today, one is a clear yes, one is a "not yet"
Re-verified the inventory against current
origin/mainof all four repos today (2026-08-06). The three vestigial installs are all still there —networksandinput_outputinlecture-python-intro,doubts_or_variabilityinlecture-python-advanced.mysteach carry apip install pandas-datareaderline with no matching import, while the five real users (business_cycle,unemployment_linear,unemployment_shocks,phillips_lost_conquest,phillips_two_stories) have both.The three questions at the bottom of this issue have different answers, and bundling them is what makes this feel undecidable.
1. Delete the vestigial installs — do this now, independent of everything else
Three lecture pages install a package they never import.
doubts_or_variabilityis the instructive one: it carries an in-lecture comment recording that it deliberately reads FRED's CSV endpoint instead, so the migration already happened and only the install line survived. Removing these three lines is a no-op for output, shrinks three build environments, and needs no decision from the questions below. It should not wait for P4.2. Move
pandas_datareaderout of lecture runtime — yes, unambiguouslyThis is the part
PLAN.mdPhase 5 already commits to and this issue frames correctly: a fetch that runs on a cadence inscripts/, whose failures surface in one canary rather than in seven lecture repos' CI, and lectures read a stable URL. Nothing here depends on which client the builder uses.AGENTS.mdstates the principle already — live API calls are for teaching data access, not for getting data.3. Make
pandas_datareader.macrothe standard fetch layer — not yet, and probably not forUNRATERecommending no to standardising, for three reasons.
The four-stage contract is already the standard, and it is the right level.
fetch()returns raw,preprocess()is pure,validate()reads the manifest. That interface is what makes builders uniform and swappable; mandating a specific client underneath adds no uniformity the contract does not already provide, and a fetch stage is typically five lines. Standardising the library rather than the interface buys little and constrains a lot.The maintenance history argues for keeping the blast radius small. The package was effectively unmaintained from July 2021 to June 2026. Two releases in one week in June 2026 is genuinely good news and worth acting on — but it is not yet a track record. Making it the mandatory entry point for every dynamic dataset re-creates the single-point fragility Phase 5 exists to remove, just relocated from seven repos into one chokepoint. QuantEcon/lecture-python.myst#924 is the reminder of what that costs when it breaks.
For
UNRATEspecifically there is a lower-risk option with in-repo precedent. A cron builder fetching one FRED series needs a plain HTTP GET againstfredgraph.csv— no dependency, no wrapper, no version surface. That is exactly the migrationdoubts_or_variabilityalready made on purpose, andlecture-python-programming'spandas/polarslessons already teach the same endpoint. Writing P4 againstread_macrowould be adding a dependency to replace a URL.Where
pandas_datareader.macrowould earn its place: a builder that genuinely needs many series across FRED and Eurostat and OECD with one normalised frame. No current or planned dataset does — the FRED incidental set in the migration plan's Wave 7 is FRED-only. Worth revisiting the moment a multi-source builder is actually on the table, and this issue is the right place to keep that open.4. Does the live path stay in lectures?
Keep it exactly where the fetch is the lesson —
lecture-python-programming'spandasandpolars— and nowhere else. Those two are annotatedpedagogy: lessonin the audit for precisely this reason and should keep calling live APIs, because the call is the content. For the fifteen incidental and mixed lectures, the target is snapshot-only with the live call shown but not executed, which is the switch mechanism P4 has to document.Effect on QuantEcon/meta#160
That issue's premise — "last released 2021, maintainer not inclined to maintain the readers" — is now factually out of date and it should be re-read against this before anyone acts on it. But the recommendation above does not resurrect the package as a lecture dependency either: items 1 and 2 still reduce its footprint substantially. The two issues are compatible.
Related: #14 (the builder contract these fetch stages implement) and the P4 work in
PLAN.mdPhase 8.mmcky commentedon Sep 1, 2026
Decided and acted on, 2026-09-01 — all three questions from the recommendation above.
1. The vestigial installs — done.
lecture-python-introdroppednetworksandinput_output's lines in QuantEcon/lecture-python-intro#803; the last one,doubts_or_variability, is QuantEcon/lecture-python-advanced.myst#381.2.
pandas_datareaderout of lecture runtime — yes, and the mechanism now exists. The refresh-as-PR workflow and weekly canary landed in #110; the first FRED snapshots built on it are in #114.3. Not
pandas_datareader.macro— a shared library of our own, and one builder per source. #114 addsbuilders/_fred.py, aFredclass overfredgraph.csv(fred.series('UNRATE'),fred.frame([...]), server-side frequency change, theobservation_date→DATErename), so a FRED builder's fetch stage is one line and itsvalidate()is the only thing worth reading. The first user isbuilders/business_cycle_fred.py, which writes the introbusiness_cyclelecture's six FRED series as one composite monthly file — one file per source rather than one per series, because six URLs in a lecture is what makes it hard to read, and the composite's columns are the lecture's own variable names. Testing stays obvious: the class is testable alone, and each builder's contract is a singlevalidate().4. The live path stays where the fetch is the lesson —
lecture-python-programming'spandasandpolars, and now explicitlylecture-python-intro'sbusiness_cycle(decided today: intro keeps every live call;lecture-wasm, which cannot make them, reads the snapshots — QuantEcon/lecture-wasm#70).pandas_datareader.macroremains worth revisiting the day a builder genuinely needs FRED and Eurostat and OECD in one frame; none does yet. Leaving this open only for that — say the word and I'll close it as decided.P4: the business_cycle snapshot set — three World Bank tables and a F…