-
-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
BUG/API: maybe drop recently introduced "takeable" from reindex? #6612
Comments
if u can get tests to pass without it go for it it is not a user option at all but triggered via an iloc call I don't disagree with any of your points and maybe it can be removed this wasn't that recent |
You did see me do Also, I'm pretty sure I've seen a description of |
its not meant to be called by the user just try to take it out I am sure it's possible but not trivial maybe you can find a nice way of refactoring |
IDK, I use |
your example looks fine to me go ahead take it out and see what happens if you can make things work without it great |
The series has an index of integers counting down. Now,
hence, I'd expect it to return the same reversed series as This happens because there are (multiple) optimization shortcuts that check if |
the point is takeble is an internal call and has very specific uses/guarantees you can change it to _takeable if u want or try to remove it from the public interface the problem is that reindex is called everywhere and so adding another level of call is possible but a big. change I agree that this was a work around |
Ok, I'll see to it. |
I think there might be an issue with
reindex(..., takeable=True)
introduced in a recent release and you might want to consider deprecating/dropping it while it hasn't crept to user code too much.The main reason is that reindex takeable is conceptually different from reindex: the latter can introduce new rows with values that must be filled while the former cannot. Essentially, reindex takeable is no more than a fancy indexing operation of numpy which is already available via
iloc
indexer. If you consider reindex parameters, you can see there' no additional value in reindex takeable:method
,limit
&fill_value
parameters are useless since no empty cells can appearlevel
parameter should be available to user via fancy multiindex slicing added recentlycopy
is also achievable via.copy()
methodSo not only it adds no value, but it also increases complexity:
The last point has already caused a bug:
Of course, this can be fixed by inserting workarounds here and here but this will increase complexity even more and won't address the conceptual issue.
The text was updated successfully, but these errors were encountered: