pandas.api.extensions.ExtensionArray.take

pandas 3.1.1 · Extensions · method

Select values by integer position in the order supplied.

Call syntax

pd.api.extensions.ExtensionArray.take(indices, *, allow_fill=False, fill_value=None)

Run the example

Edit the example and select Run Python to see the result.

Parameters

ParameterRequirementAccepted values and behavior
indices Required
Positional or keyword
sequence of int or one-dimensional np.ndarray of int

Supply the integer positions selected from the input.

allow_fill Optional
Keyword only
Default False
bool
fill_value Optional
Keyword only
Default None
any

Supply a value to use in place of a missing position.

Returns

ExtensionArray