-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Index.map followups #18482
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
Comments
cc @jorisvandenbossche (point 3) |
Regarding point 1: To be clear, the underlying issue referenced here is #16410, right? |
Side note: should mapping an empty dictionary against an In [2]: pd.interval_range(0, 4).map({})
Out[2]: Float64Index([nan, nan, nan, nan], dtype='float64') |
@jschendel I just noticed that #18491 fixes all of the Indexes to return correctly there own type if |
@jreback Is there a specific reason you pinged me for point 3 ? (apart from general attention) |
@jorisvandenbossche no, you had raised the point in the original issue (note this is all now resolved by #18491) |
Ah, I forgot that one :-) |
(I don't know if this is the right place to put this, happy to open a new issue if that's better.) According to my reading of this PR, the following should work as of 0.22.0:
But for me it throws a ValueError. Whereas this works fine:
|
@louispotok : The PR you linked to has a milestone of 0.23.0, so the behavior should only work as of that release (should be relatively soon): In [2]: pd.__version__
Out[2]: '0.23.0rc2'
In [3]: s = pd.Series({0:'a',1:'b'})
In [4]: s.index.map(pd.Series({0:'c',1:'d'}))
Out[4]: Index(['c', 'd'], dtype='object') |
Oh thanks @jschendel , my mistake: I saw this event putting it in the 0.22.0, and didn't see that the milestone was later moved. |
Ah, I was basing the 0.23.0 milestone off the right hand side summary at the top of the PR. Probably moved to 0.23.0 after the fact; the 0.22.0 release happened pretty shortly after 0.21.x and only contained one major change. Many things originally slated for 0.22.0 got moved to 0.23.0 after the being merged to accommodate the new plan for the 0.22.0 release. |
@jschendel is this closable? I don't see an |
Yes, I think this can be closed. |
xref #15081, a couple of issues
IntervalIndex.map
is xfailedindexex/datetimelike.py/test_map
is done (IOW on dict / Series) (COMPAT: map infers all-nan / empty correctly #18491)NaT
for the datetimelikes. (COMPAT: map infers all-nan / empty correctly #18491)The text was updated successfully, but these errors were encountered: