-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
refactor(python): Refactor Series/DataFrame.__getitem__
logic
#16482
Merged
Conversation
This file contains 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
github-actions
bot
added
internal
An internal refactor or improvement
python
Related to Python Polars
labels
May 25, 2024
stinodego
force-pushed
the
depr-getitem-row
branch
2 times, most recently
from
May 25, 2024 10:08
eb856b2
to
0401a56
Compare
stinodego
requested review from
ritchie46,
c-peters,
alexander-beedie,
MarcoGorelli and
reswqa
as code owners
May 25, 2024 10:09
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16482 +/- ##
==========================================
- Coverage 81.51% 81.51% -0.01%
==========================================
Files 1409 1410 +1
Lines 184974 185032 +58
Branches 2981 2981
==========================================
+ Hits 150778 150823 +45
- Misses 33675 33693 +18
+ Partials 521 516 -5 ☔ View full report in Codecov by Sentry. |
stinodego
force-pushed
the
depr-getitem-row
branch
from
May 26, 2024 08:30
3326cf8
to
05bc79d
Compare
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.
This is in preparation for #4924
Changes
DataFrame.select_at_idx
in the PyO3 bindings toDataFrame.to_series
to match the Python public API.DataFrame.to_series
to accept negative indices (implemented in the PyO3 bindings, just likeSeries.get_index_signed
). Remove this bound checking from various other places.is_int_sequence
), use first entry instead and fail later.We should probably add some methods to the API like
DataFrame.filter_columns
andDataFrame.get_columns_by_index
- these are only available through__getitem__
right now.