pandas.api.types.pandas_dtype

pandas 3.1.1 · Arrays, scalars, and data types · function

Normalize a dtype specification to a pandas or NumPy dtype object.

Call syntax

pd.api.types.pandas_dtype(dtype)

Run the example

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

Parameters

ParameterRequirementAccepted values and behavior
dtype Required
Positional or keyword
object

Choose the data type for the input conversion or result.

Returns

np.dtype or a pandas dtype