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.dtypesReturn the dtype object of the underlying data.
Series.astypeCast a pandas object to a specified dtype dtype.
Series.convert_dtypesConvert columns to the best possible dtypes using dtypes supporting pd.NA.
Examples
>>> s = pd.Series([1, 2, 3]) >>> s.dtype dtype('int64')