pandas.Series.map
pandas 3.1.1 · Series and accessors · method
Map each Series value through a callable, dictionary or Series lookup.
Call syntax
Series.map(func=None, na_action=None, engine=None, **kwargs)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
func |
Optional Positional or keyword Default None |
function, collections.abc.Mapping subclass or Series Supply a supported operation name or a callable, depending on this API. |
na_action |
Optional Positional or keyword Default None |
{None, 'ignore'} Control how the mapper treats missing inputs. |
engine |
Optional Positional or keyword Default None |
decorator Choose the implementation that performs the operation. |
**kwargs |
Optional Additional keyword arguments |
Returns
Series