-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
Partial string indexing returns ndarray rather than Series. #27516
Comments
That's an indexing bug. Somehow In [27]: df = pd.DataFrame({"A": 1}, index=pd.date_range("2000", periods=100))
In [28]: df.loc['2000-01', 'A']
Out[28]:
array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1]) |
#27110 seems like the most likely candidate (cc @jbrockmendel). IIUC, we can't treat This may warrant an expedited 0.25.1. WDYT @jreback? |
likely more things would show as people actually use the new release let’s just do a few weeks on this |
At first glance, I don't see how #27110 would cause this since that should affect DatetimeTZBlock but not DatetimeBlock. There have been some other recent PRs that have tried to simplify core.indexing, maybe something got lost in there. I'll take a look. |
Ah sorry. I was just going release notes that sounded promising and stopped at that one. |
Tracking this down a bit, following Tom's example.
|
Looks like the relevant change was #26298 |
Thanks @jbrockmendel. I would not have guessed that based on the name. Do you have a fix in mind? |
In |
Thanks for taking care about this. |
Code Sample, a copy-pastable example if possible
Output:
Problem description
Before updating from 0.24.0 to 0.25.0 everything worked fine. I can also not see, that there was an API change here. I would expect, that the second sum, works without issues.
Expected Output
Output (something like):
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: