pyspark.pandas.Index.dtype¶
-
property
Index.
dtype
¶ Return the dtype object of the underlying data.
Examples
>>> s = ps.Series([1, 2, 3]) >>> s.dtype dtype('int64')
>>> s = ps.Series(list('abc')) >>> s.dtype dtype('O')
>>> s = ps.Series(pd.date_range('20130101', periods=3)) >>> s.dtype dtype('<M8[ns]')
>>> s.rename("a").to_frame().set_index("a").index.dtype dtype('<M8[ns]')