pandas.api.extensions.ExtensionArray.repeat

pandas 3.1.1 · Extensions · method

Repeat each value the given number of times. String repeat repeats the text within each element.

Call syntax

pd.api.extensions.ExtensionArray.repeat(repeats, axis=None)

Run the example

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

Parameters

ParameterRequirementAccepted values and behavior
repeats Required
Positional or keyword
int or array of ints

Set how many copies of each element to produce.

axis Optional
Positional or keyword
Default None
None

Choose which axis the operation acts on. The accepted axis labels depend on the receiver.

Returns

ExtensionArray