ENH: Series.map() that works with a dictionary of key-list pairs #58108
Labels
Closing Candidate
May be closeable, needs more eyeballs
Enhancement
Needs Triage
Issue that has not been reviewed by a pandas team member
Feature Type
Adding new functionality to pandas
Changing existing functionality in pandas
Removing existing functionality in pandas
Problem Description
Dictionaries are perfect for mapping, but I often have the situation where I need to reassign multiple values to a single key value. However, Series.map() does the opposite, by searching through the keys and assigning the values.
Feature Description
I use this currently:
Alternative Solutions
I think the above using base python and Series.explode() should do it
Additional Context
No response
The text was updated successfully, but these errors were encountered: