Skip to content

ENH: Allow dict as the argument to Index.map (GH13517) #13518

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

Closed
wants to merge 3 commits into from

Conversation

evanpw
Copy link
Contributor

@evanpw evanpw commented Jun 26, 2016

@codecov-io
Copy link

codecov-io commented Jun 26, 2016

Current coverage is 84.33%

Merging #13518 into master will increase coverage by <.01%

@@             master     #13518   diff @@
==========================================
  Files           138        138          
  Lines         51107      51110     +3   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43103      43106     +3   
  Misses         8004       8004          
  Partials          0          0          

Powered by Codecov. Last updated by bf4786a...0b32709

Function to be applied.

Returns
-------
applied : array
"""
return self._arrmap(self.values, mapper)
if isinstance(mapper, dict):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_dict_like covers a wider range of mappings

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Fixed.

@jreback jreback added Enhancement Indexing Related to indexing on series/frames, not to indexes themselves Dtype Conversions Unexpected or buggy dtype conversions labels Jun 26, 2016
@jreback
Copy link
Contributor

jreback commented Jun 26, 2016

I would ideally like to merge the Series.map and Index.map impl and move it to Base.map like most other methods. You can move tests to tests/test_base/py:TestIndexOps. This will make these more consistent.

@jreback
Copy link
Contributor

jreback commented Sep 9, 2016

can you rebase / update?

@jreback
Copy link
Contributor

jreback commented Nov 16, 2016

closing, but pls reopen / comment if you can continue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dtype Conversions Unexpected or buggy dtype conversions Enhancement Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Index.map should allow dict as argument
4 participants