pandas.api.extensions.ExtensionArray._from_sequence

pandas 3.1.1 · Extensions · method

Implement construction of a custom extension array from scalar input values.

Call syntax

pd.api.extensions.ExtensionArray._from_sequence(scalars, *, dtype=None, copy=False)

Run the example

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

Parameters

ParameterRequirementAccepted values and behavior
scalars Required
Positional or keyword
Sequence
dtype Optional
Keyword only
Default None
dtype

Choose the data type for the input conversion or result.

copy Optional
Keyword only
Default False
bool

Control whether data is copied where the API supports that choice.

Returns

ExtensionArray