pandas.Index.view

pandas 3.1.1 · Index objects · method

Expose an alternate view or representation subject to the object's dtype and storage rules.

Call syntax

Index.view(cls=None)

Run the example

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

Parameters

ParameterRequirementAccepted values and behavior
cls Optional
Positional or keyword
Default None
data-type or ndarray sub-class

Returns

Index or ndarray