take_nd(arr: 'ArrayLike', indexer, axis: 'int' = 0, fill_value=<no_default>, allow_fill: 'bool' = True) -> 'ArrayLike'
This dispatches to take
defined on ExtensionArrays. It does not currently dispatch to SparseArray.take
for sparse arr
.
Note: this function assumes that the indexer is a valid(ated) indexer with no out of bound indices.
Input array.
1-D array of indices to take, subarrays corresponding to -1 value indices are filed with fill_value
Axis to take from
Fill value to replace -1 values with
If False, indexer is assumed to contain no -1 values so no filling will be done. This short-circuits computation of a mask. Result is undefined if allow_fill == False and -1 is present in indexer.
May be the same type as the input, or cast to an ndarray.
Specialized Cython take which sets NaN values in one pass
The following pages refer to to this document either explicitly or contain code examples using this.
pandas.core.array_algos.take.take_1d
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