-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
WIP [ArrayManager] API: setitem to set new columns / loc+iloc to update inplace #39578
Changes from 1 commit
3220c80
803e60e
c72240c
69a6aad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -324,8 +324,8 @@ def length_of_indexer(indexer, target=None) -> int: | |
start, stop = stop + 1, start + 1 | ||
step = -step | ||
return (stop - start + step - 1) // step | ||
elif isinstance(indexer, (ABCSeries, ABCIndex, np.ndarray, list)): | ||
if isinstance(indexer, list): | ||
elif isinstance(indexer, (ABCSeries, ABCIndex, np.ndarray, list, range)): | ||
if isinstance(indexer, (list, range)): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the range case can be implemented separately + more efficiently, similar to the slice case There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You mean that a range object should have been converted to a slice before calling At the moment it's simply the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, but it's probably because of calling There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i was just thinking There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this not work? |
||
indexer = np.array(indexer) | ||
|
||
if indexer.dtype == bool: | ||
|
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.
can the decorator be used for this?