Repository navigation
[pandas_panel] Describe the single .replace() call, not a loop - #645
Conversation
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>
There was a problem hiding this comment.
🟢 Approval recommended
The one-line documentation edit accurately matches the adjacent .replace() code and is grammatically correct.
0 open findings
What changed in this PR
This PR fixes a single sentence in the pandas_panel lecture so the prose matches the code beneath it. Following the pandas 3.0 update (#470), the continent-combining example was changed from a loop over continent names to a single .replace() call that takes the whole list, but the explanatory sentence still described looping through a list. The sentence is now corrected to describe the single .replace() call.
Changes:
- Reword the sentence above the continent-replacement example to describe using
.replace()with a list rather than looping through a list. - Add a trailing period to the corrected sentence for consistency.
| File | Description |
|---|---|
| lectures/pandas_panel.md | Updates one explanatory sentence to match the single .replace() call used in the code example. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
✅ Translation sync completed (zh-cn)Target repo: QuantEcon/lecture-python-programming.zh-cn
|
✅ Translation sync completed (fr)Target repo: QuantEcon/lecture-python-programming.fr
|
✅ Translation sync completed (fa)Target repo: QuantEcon/lecture-python-programming.fa
|
Fixes one sentence in
pandas_panelthat no longer matches its code. The pandas 3.0 update (#470) replaced the loop over continent names with a single.replace()call taking the whole list, but the sentence above it still said we "loop through a list"..replace()and loop through a list of the continent values we want to replace.replace()with a list of the continent values we want to replace.Intermediate publishes this lecture too, as a byte-for-byte copy (QuantEcon/lecture-python.myst#1088). That PR takes the identical change, which Copilot flagged there, so merge this one first or together with it.
On merge, the sync carries the sentence to this series' five editions.
🤖 Generated with Claude Code