pandas 1.4.2

ParametersRaises
_get_indexer_non_comparable(self, target: 'Index', method, unique: 'bool' = True) -> 'npt.NDArray[np.intp] | tuple[npt.NDArray[np.intp], npt.NDArray[np.intp]]'

For get_indexer lookups with method=None, get_indexer is an _equality_ check, so non-comparable dtypes mean we will always have no matches.

For get_indexer lookups with a method, get_indexer is an _inequality_ check, so non-comparable dtypes mean we will always raise TypeError.

Parameters

target : Index
method : str or None
unique : bool, default True
  • True if called from get_indexer.

  • False if called from get_indexer_non_unique.

Raises

TypeError

If doing an inequality check, i.e. method is not None.

Called from get_indexer or get_indexer_non_unique when the target is of a non-comparable dtype.

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