Closed
Description
xref #15081, a couple of issues
IntervalIndex.map
is xfailedparametrize indexex/common.py/test_map similar to howindexex/datetimelike.py/test_map
is done (IOW on dict / Series) (COMPAT: map infers all-nan / empty correctly #18491)resolve datetimelike with empty map [2] should be allNaT
for the datetimelikes. (COMPAT: map infers all-nan / empty correctly #18491)
In [2]: pd.date_range('20130101', periods=3).map({})
Out[2]: Float64Index([nan, nan, nan], dtype='float64')
In [3]: pd.Index([1,2,3]).map({})
Out[3]: Float64Index([nan, nan, nan], dtype='float64')
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
jreback commentedon Nov 25, 2017
cc @jorisvandenbossche (point 3)
cc @jschendel (point 1)
TST: test_map parametrize
jschendel commentedon Nov 26, 2017
Regarding point 1: To be clear, the underlying issue referenced here is #16410, right?
test_map
xpasses locally for me, and that was the closest thing I could find based on the xfail message. The problem described in #16410 is still occurring, but I haven't immediately been able to produce any errors withmap
using a similar setup.jschendel commentedon Nov 26, 2017
Side note: should mapping an empty dictionary against an
IntervalIndex
return anIntervalIndex
? Currently returns aFloat64Index
, which seems kind of strange:jreback commentedon Nov 26, 2017
@jschendel I just noticed that
test_interval.py/test_map
is xfailed. It might have been disabled during this re-factoring. if that is the case, then just need to re-eable.#18491 fixes all of the Indexes to return correctly there own type if
{}
is passed. I think II should do the same (but again still xfailed).TST: test_map parametrize
jorisvandenbossche commentedon Nov 27, 2017
@jreback Is there a specific reason you pinged me for point 3 ? (apart from general attention)
jreback commentedon Nov 27, 2017
@jorisvandenbossche no, you had raised the point in the original issue (note this is all now resolved by #18491)
jorisvandenbossche commentedon Nov 27, 2017
Ah, I forgot that one :-)
louispotok commentedon May 2, 2018
(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:
jschendel commentedon May 2, 2018
@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):
louispotok commentedon May 2, 2018
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.
jschendel commentedon May 2, 2018
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.
mroeschke commentedon Oct 7, 2019
@jschendel is this closable? I don't see an
xfail
on anytest_map
methods.jschendel commentedon Oct 9, 2019
Yes, I think this can be closed.