pandera.Index.coerce_dtype

Index.coerce_dtype(series_or_index)[source]

Coerce type of a pd.Index by type specified in pandas_dtype.

Parameters

series (pd.Index) – One-dimensional ndarray with axis labels (including time series).

Return type

Index

Returns

Index with coerced data type