pandas.DataFrame.astype — pandas 1.3.5 documentation
pandas.pydata.org › pandasDataFrame.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 and dtype is a numpy ...