pandas.Series.astype — pandas 1.3.5 documentation
pandas.pydata.org › api › pandaspandas.Series.astype. ¶. Series.astype(dtype, copy=True, errors='raise') [source] ¶. Cast a pandas object to a specified dtype dtype. Parameters. dtypedata type, or dict of column name -> data type. Use a numpy.dtype or Python type to cast entire pandas object to the same type. Alternatively, use {col: dtype, …}, where col is a column label ...