pandas.Categorical.__array__
pandas 3.1.1 · Arrays, scalars, and data types · method
Expose values through NumPy's array protocol.
Call syntax
Categorical.__array__(dtype=None, copy=None)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
dtype |
Optional Positional or keyword Default None |
np.dtype or None Choose the data type for the input conversion or result. |
copy |
Optional Positional or keyword Default None |
bool or None Control whether data is copied where the API supports that choice. |
Returns
numpy.array