MultiIndex.
astype
Cast a pandas-on-Spark object to a specified dtype dtype.
dtype
Use a numpy.dtype or Python type to cast entire pandas object to the same type.
See also
to_datetime
Convert argument to datetime.
Examples
>>> ser = ps.Series([1, 2], dtype='int32') >>> ser 0 1 1 2 dtype: int32
>>> ser.astype('int64') 0 1 1 2 dtype: int64
>>> ser.rename("a").to_frame().set_index("a").index.astype('int64') Int64Index([1, 2], dtype='int64', name='a')