-
Notifications
You must be signed in to change notification settings - Fork 0
51 replace gdppercap 1972 with 1972 #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Updated code blocks in the pandas essential episode to use '1972' instead of 'gdpPercap_1972'.
Thank you!Thank you for your pull request 😃 🤖 This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}. If you have files that automatically render output (e.g. R Markdown), then you should check for the following:
Rendered Changes🔍 Inspect the changes: https://github.com/UoMResearchIT/programming_with_python/compare/md-outputs..md-outputs-PR-55 The following changes were observed in the rendered markdown documents: What does this mean?If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible. This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation. ⏱️ Updated at 2025-11-14 11:27:30 +0000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the pandas tutorial to improve consistency by renaming the main variable from data to df and standardizing terminology around "DataFrame". It also fixes issue #51 by updating column label references in a challenge question to reflect the cleaned column names (from 'gdpPercap_1972' to '1972').
- Renamed the main DataFrame variable from
datatodfthroughout the tutorial - Standardized capitalization and usage of "DataFrame" terminology
- Updated challenge question to use the correct column label format after cleanup ('1972' instead of 'gdpPercap_1972')
Comments suppressed due to low confidence (1)
episodes/07-pandas_essential.md:1
- The
str.strip()method is incorrect here. Thestrip()method removes characters from the beginning and end of a string, not as a prefix. Since 'gdpPercap_' is a prefix, this should usestr.replace('gdpPercap_', '')orstr.lstrip('gdpPercap_')instead. Withstrip(), the columns would incorrectly have individual characters removed.
---
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Merge to close #51
I also changed "data" to "df" and used more consistent terminology for Dataframe in the chapter
Merge to close #50