Skip to content

Add python-pandas-tricks materials folder - #983

Open
realpython-bot wants to merge 1 commit into
masterfrom
maintenance/python-pandas-tricks-20261202
Open

realpython-bot wants to merge 1 commit into
masterfrom
maintenance/python-pandas-tricks-20261202

Conversation

@realpython-bot

Copy link
Copy Markdown
Collaborator

Adds the companion code folder for Python pandas: Tricks & Features You May Not Know, which ships runnable code but had no folder in this repo.

Contents

  • pandas_startup.py: the interpreter startup script from trick Create SP500.csv #1 (display options, including min_rows).
  • membership_map.py: membership_map() from trick Materials for decorator update #7, with the article's countries example under if __name__ == "__main__".
  • requirements.txt: pandas==3.1.2, numpy==2.5.5, matching the update draft's dependencies field.
  • README.md with setup and usage.

Why: the full-update pass re-recorded the article on pandas 3.1.2 / Python 3.15.2; this folder mirrors the code as the update draft has it.

Verified: fresh venv on Python 3.15.2 from the pinned requirements.txt; membership_map.py prints the article's output; PYTHONSTARTUP=pandas_startup.py python reports display.max_rows == 14. ruff@0.14.1 format --check and ruff check pass; dircheck.py passes.

Update draft (admin): https://realpython.com/pbjt/blog/post/2414/change/
Maintenance card: https://trello.com/c/VcBe57sv

🤖 Generated with Claude Code

Sample code for the pandas tricks tutorial: the interpreter startup
script (trick #1) and membership_map() (trick #7), pinned to
pandas 3.1.2 / NumPy 2.5.5 and verified on Python 3.15.2.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant