Skip to content

[pandas_panel] Describe the single .replace() call, not a loop - #645

Merged
mmcky merged 1 commit into
mainfrom
fix/pandas-panel-replace-sentence
Oct 12, 2026
Merged

mmcky merged 1 commit into
mainfrom
fix/pandas-panel-replace-sentence

Conversation

@mmcky

@mmcky mmcky commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Fixes one sentence in pandas_panel that 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".

Now Proposed
To do this, we will use .replace() and loop through a list of the continent values we want to replace To do this, we will use .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

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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.

@github-actions

Copy link
Copy Markdown

@mmcky
mmcky merged commit 85586e6 into main Oct 12, 2026
5 checks passed
@mmcky
mmcky deleted the fix/pandas-panel-replace-sentence branch October 12, 2026 01:34
@mmcky

mmcky commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

✅ Translation sync completed (zh-cn)

Target repo: QuantEcon/lecture-python-programming.zh-cn
Translation PR: QuantEcon/lecture-python-programming.zh-cn#107
Files synced (1):

  • lectures/pandas_panel.md

@mmcky

mmcky commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

✅ Translation sync completed (fr)

Target repo: QuantEcon/lecture-python-programming.fr
Translation PR: QuantEcon/lecture-python-programming.fr#96
Files synced (1):

  • lectures/pandas_panel.md

@mmcky

mmcky commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

✅ Translation sync completed (fa)

Target repo: QuantEcon/lecture-python-programming.fa
Translation PR: QuantEcon/lecture-python-programming.fa#170
Files synced (1):

  • lectures/pandas_panel.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants