-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
STY: Use strict arg in zip() in pandas/core/reshape
#62483
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
Alvaro-Kothe
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.
Remove the files you modified from pyproject.toml
|
@jsngn can you merge main and see if you can address the failing tests |
|
@jbrockmendel Still failing on errors that are seemingly unrelated to my PR, I'm not sure why |
|
Some of those are unrelated and hopefully will resolve themselves next time you push to the branch. Others look real: |
|
Thanks for calling my attention to the issues. PR is passing now, please re-review, thank you! @Alvaro-Kothe @jbrockmendel |
|
@jsngn can you address comments and merge main |
Alvaro-Kothe
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.
Looks great overall.
| prefix = itertools.islice( | ||
| itertools.cycle([prefix]), data_to_encode.shape[1] | ||
| ) |
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.
Nice Idea! But I think that itertools.repeat should be preferred.
| prefix_sep = itertools.islice( | ||
| itertools.cycle([prefix_sep]), data_to_encode.shape[1] | ||
| ) |
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.
Same here
| # Not all indices can accept None values. | ||
| Index(new_lev, dtype=lev.dtype) if None not in new_lev else new_lev | ||
| for new_lev, lev in zip(new_levs, columns.levels) | ||
| for new_lev, lev in zip(new_levs, columns.levels, strict=False) |
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.
Just to confirm: was there a failing test because this was True?
Tests added and passed if fixing a bug or adding a new featurenot applicableAdded type annotations to new arguments/methods/functions.not applicableAdded an entry in the latestnot applicabledoc/source/whatsnew/vX.X.X.rstfile if fixing a bug or adding a new feature.