pandas.Index.repeat
pandas 3.1.1 · Index objects · method
Repeat each value the given number of times. String repeat repeats the text within each element.
Call syntax
Index.repeat(repeats, axis=None)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted 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
Index