Repository navigation
[pandas_panel] Take programming's text, so both series publish one lecture - #1088
Conversation
…cture
Programming and intermediate both publish pandas_panel. The two copies
were the same lecture drifting apart: programming's carries the pandas
3.0 update and later tidy-ups that never reached this copy. John and
Matt decided on 2026-10-12 to publish one text (project-monorepo#110),
so this copy becomes programming's, byte for byte.
Programming's text links to its pandas lecture with {doc}`pandas`,
which this site does not have. intersphinx_disabled_reftypes: [] lets
a reference with no local target resolve through intersphinx, here to
python-programming.quantecon.org. Every other reference in this series
already resolves locally (the build runs -n -W), so nothing else moves.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
📖 Netlify Preview Ready!Preview URL: https://pr-1088--sunny-cactus-210e3e.netlify.app Commit: 📚 Changed LecturesBuild Info
|
There was a problem hiding this comment.
🟡 Changes recommended
The vectorized .replace() rewrite leaves the preceding sentence ("loop through a list") describing behavior the code no longer performs, a prose/code inconsistency worth correcting (ideally upstream to preserve the intended sync).
1 open finding
What changed in this PR
This PR makes lectures/pandas_panel.md a single lecture that both the "programming" and "intermediate" series publish, by replacing this series' copy with the programming version's text (which carries the pandas 3.0 updates and earlier tidy-ups). A one-line Sphinx config change (intersphinx_disabled_reftypes: []) lets the in-page {doc}pandas`` reference resolve to the programming site via intersphinx, since there is no local pandas.md.
Changes:
- Adopt programming's pandas 3.0 code forms (
stack()withoutfuture_stack, a single vectorized.replace()instead of a loop, top-level imports, a.T/groupbynote) and read data fromraw.githubusercontent.com. - Replace the hard-coded pandas link with
{doc}earlier lecture on pandas `` and transpose the average-by-continent output so continents are rows. - Add
intersphinx_disabled_reftypes: []tolectures/_config.ymlso a reference with no local target resolves through intersphinx.
| File | Description |
|---|---|
| lectures/pandas_panel.md | Replaces the lecture body with programming's copy: pandas 3.0 API usage, top imports, {doc} cross-reference, updated data URLs, and a transposed continent aggregation. |
| lectures/_config.yml | Enables intersphinx fallback for untargeted references so {doc}pandas`` resolves to the programming site. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The sentence above the continent recoding still said we "loop through a list", but the code makes one .replace() call with the whole list. Say what the code does, and end the sentence with a full stop. Programming takes the identical change, so the two copies stay byte-identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Translation sync completed (zh-cn)Target repo: QuantEcon/lecture-python.zh-cn
|
The pandas 3.0 update replaced the loop over continent names with one .replace() call taking the whole list, but the sentence above it still said we "loop through a list". Say what the code does, and end the sentence with a full stop. Intermediate publishes this lecture too; its copy takes the same change in QuantEcon/lecture-python.myst#1088, so the two stay byte-identical. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
pandas_panel now links to programming's pandas lecture with
{doc}`pandas`, which this site does not have, and the build runs
-n -W. intersphinx_disabled_reftypes: [] lets a reference with no local
target resolve through intersphinx (here the pyprog mapping), as
QuantEcon/lecture-python.myst#1088 did for the English edition. Every
other reference already resolves locally, so nothing else moves.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The source (QuantEcon/lecture-python.myst#1088) moved its imports into a new top cell and deleted its mid-lecture import cell. In this edition that cell also set the Source Han Serif font and loaded country_map, the Chinese country names, so the sync removed both: the bar-chart cell raised NameError: name 'country_map' is not defined, and every figure lost its Chinese font. Put the font setup in the new top import cell, as this edition's other lectures do, and load country_map at the top of the bar-chart cell, which keeps 47 code cells, the same as the source. The whole lecture now executes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…series publish one lecture (#293) * Update translation: lectures/pandas_panel.md * Update translation: .translate/state/pandas_panel.md.yml * Resolve pandas_panel's link to the pandas lecture through intersphinx pandas_panel now links to programming's pandas lecture with {doc}`pandas`, which this site does not have, and the build runs -n -W. intersphinx_disabled_reftypes: [] lets a reference with no local target resolve through intersphinx (here the pyprog mapping), as QuantEcon/lecture-python.myst#1088 did for the English edition. Every other reference already resolves locally, so nothing else moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Restore the CJK font setup and country_map that the sync dropped The source (QuantEcon/lecture-python.myst#1088) moved its imports into a new top cell and deleted its mid-lecture import cell. In this edition that cell also set the Source Han Serif font and loaded country_map, the Chinese country names, so the sync removed both: the bar-chart cell raised NameError: name 'country_map' is not defined, and every figure lost its Chinese font. Put the font setup in the new top import cell, as this edition's other lectures do, and load country_map at the top of the bar-chart cell, which keeps 47 code cells, the same as the source. The whole lecture now executes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Makes
pandas_panelone lecture that programming and intermediate both publish: this series' copy is replaced by programming's text, byte for byte. John and Matt decided this on 2026-10-12 (QuantEcon/project-monorepo#110).Why. The two copies were the same lecture, with the same sections and exercises and 97% identical text, but drifting apart. Programming's carries the pandas 3.0 update (QuantEcon/lecture-python-programming#470) and the August tidy-ups (QuantEcon/lecture-python-programming#595), which never reached this copy. From now on a change is made once, in programming, and copied here.
What changes for readers of this series.
stack()withoutfuture_stack, a note on.Twithgroupby), onereplacecall in place of a loop, imports at the top, and the data read fromraw.githubusercontent.com.{doc}`pandas`. It resolves to python-programming.quantecon.org, as the old hard-coded address did.The one configuration line.
intersphinx_disabled_reftypes: []lets a reference with no target in this site resolve through intersphinx, here to programming'spandas, which no other mapped site has. Every other reference in the series already resolves locally (the build runs-n -W), so nothing else moves. This is the line the lecture monorepo puts in every product.One sentence fixed in both copies. Copilot noticed that the sentence above the continent recoding still said "loop through a list", though the code makes a single
.replace()call. It is fixed here (d72d499) and identically in programming, QuantEcon/lecture-python-programming#645: merge that one first, or together with this, so the copies match.Follow-up in the Chinese edition. When this merges, the translation sync opens a pull request in QuantEcon/lecture-python.zh-cn. That edition also builds with
-n -W, so itslectures/_config.ymlneeds the same line, added by hand to the sync pull request (as with the rename redirects on 2026-10-09).🤖 Generated with Claude Code