-
-
Notifications
You must be signed in to change notification settings - Fork 19.1k
Zip Strict for pandas/util and pandas/_libs #62469 #62540
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
Conversation
@Copilot
Copilot
AI
left a comment
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 updates zip()
calls throughout pandas/util and pandas/_libs to explicitly specify the strict
parameter, enhancing code clarity and safety by making the intended behavior explicit regarding mismatched iterator lengths.
- Adds
strict=False
to cases where mismatched lengths are intentionally allowed - Adds
strict=True
to cases where iterators are expected to have equal lengths - Updates both Python (.py) and Cython (.pyx) files across utility and core library modules
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
pandas/util/_validators.py | Added strict=False to validation functions where argument length mismatches are handled |
pandas/util/_doctools.py | Added strict=True to plotting functions expecting paired data |
pandas/_libs/tslibs/timezones.pyx | Added strict=True for timezone transition list processing |
pandas/_libs/tslibs/offsets.pyx | Mixed usage: strict=True for paired data, strict=False for frequency parsing |
pandas/_libs/tslibs/fields.pyx | Added strict=True for datetime field processing |
pandas/_libs/missing.pyx | Added strict=True for tuple equality checking |
pandas/_libs/index.pyx | Added strict=True for multi-index level processing |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Thanks @shivamvishal
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.