pandas 1.4.2

Parameters
_str_map(self, f, na_value=None, dtype: 'NpDtype | None' = None, convert: 'bool' = True)

Parameters

f : Callable

A function to call on each non-NA element.

na_value : Scalar, optional

The value to set for NA values. Might also be used for the fill value if the callable f raises an exception. This defaults to self._str_na_value which is np.nan for object-dtype and Categorical and pd.NA for StringArray.

dtype : Dtype, optional

The dtype of the result array.

convert : bool, default True

Whether to call maybe_convert_objects on the resulting ndarray

Map a callable over valid elements of the array.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /pandas/core/strings/object_array.py#39
type: <class 'function'>
Commit: