diff --git a/pandas/core/generic.py b/pandas/core/generic.py index ee41d07c52774..04055cd16f106 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -6004,11 +6004,12 @@ def astype( Parameters ---------- - dtype : data 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.dtype or Python type to cast one - or more of the DataFrame's columns to column-specific types. + dtype : str, data type, Series or Mapping of column name -> data type + Use a str, numpy.dtype, pandas.ExtensionDtype or Python type to + cast entire pandas object to the same type. Alternatively, use a + mapping, e.g. {col: dtype, ...}, where col is a column label and dtype is + a numpy.dtype or Python type to cast one or more of the DataFrame's + columns to column-specific types. copy : bool, default True Return a copy when ``copy=True`` (be very careful setting ``copy=False`` as changes to values then may propagate to other