pandas.Series.dtype#

property Series.dtype[source]#

Return the dtype object of the underlying data.

This is the dtype of the array backing the Series (or the single dtype for a DataFrame column). For extension types, it returns the corresponding extension dtype.

See also

Series.dtypes

Return the dtype object of the underlying data.

Series.astype

Cast a pandas object to a specified dtype dtype.

Series.convert_dtypes

Convert columns to the best possible dtypes using dtypes supporting pd.NA.

Examples

>>> s = pd.Series([1, 2, 3])
>>> s.dtype
dtype('int64')