Repository navigation
Sync pandas-intro with the updated tutorial - #939
Open
realpython-bot wants to merge 1 commit into
Open
realpython-bot wants to merge 1 commit into
realpython-bot wants to merge 1 commit into
Conversation
…hon to Explore Your Dataset Co-Authored-By: Claude Opus 5.5 <[email protected]>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syncs
pandas-intro/with the maintenance update of Using pandas and Python to Explore Your Dataset for pandas 3.What changed in
pandas_intro.ipynb:requests==2.34.*,pandas==3.1.*,matplotlib==3.11.*city_revenues[1]andcity_revenues[-1]cells removed. Since pandas 3.0,Series.__getitem__treats integer keys as labels, so both raiseKeyErroron a string index. The tutorial now points to.ilocinstead.fillna(..., inplace=True)on a selected column replaced with assignment. Under Copy-on-Write it never updated the DataFrame.nba.describe(include=object)→include="str". The old form emits aPandas4Warningon pandas 3.1..value_counts()(column header,Name: count) andnp.int64(8000)download_urlline wrapped to match the articleDraft article: https://realpython.com/pbjt/blog/post/2627/change/ (preview: https://realpython.com/pandas-python-explore-dataset-update/)
Maintenance card: https://trello.com/c/13Nmm2CS
Verification: Executed the whole notebook with nbclient on Python 3.15.1, pandas 3.1.1, matplotlib 3.11.2, and requests 2.34.2 (
MPLBACKEND=Agg). All cells ran without errors, and thefillnacell now reportstop: no notes at all.[email protected] format --checkandruff checkpass onpandas-intro/.Known leftover, matching the article:
df.drop(elo_columns, inplace=True, axis=1)emits aPandas4Warning(inplace deprecation, PDEP-8). That's flagged for the article's full update.🤖 Generated with Claude Code