pandas 1.4.2

ParametersReturns
_formatter(self, boxed: 'bool' = False) -> 'Callable[[Any], str | None]'

This is used in the default '__repr__'. The returned formatting function receives instances of your scalar type.

Parameters

boxed : bool, default False

An indicated for whether or not your array is being printed within a Series, DataFrame, or Index (True), or just by itself (False). This may be useful if you want scalar values to appear differently within a Series versus on its own (e.g. quoted or not).

Returns

Callable[[Any], str]

A callable that gets instances of the scalar type and returns a string. By default, repr is used when boxed=False and str is used when boxed=True .

Formatting function for scalar values.

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/arrays/base.py#1248
type: <class 'function'>
Commit: