pandas 1.4.2

ParametersReturns
take(self, indices, axis: 'int' = 0, allow_fill: 'bool' = True, fill_value=None, **kwargs)

For internal compatibility with numpy arrays.

Parameters

indices : array-like

Indices to be taken.

axis : int, optional

The axis over which to select values, always 0.

allow_fill : bool, default True
fill_value : scalar, default None

If allow_fill=True and fill_value is not None, indices specified by -1 are regarded as NA. If Index doesn't hold NA, raise ValueError.

Returns

Index

An index formed of elements at the given indices. Will be the same type as self, except for RangeIndex.

Return a new Index of the values selected by the indices.

See Also

numpy.ndarray.take

Return an array formed from the elements of a at the given indices.

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#1098
type: <class 'function'>
Commit: