From 2b5319793dcce8d7382142ff90b9aeca22e6d64b Mon Sep 17 00:00:00 2001 From: ram vikram singh Date: Sun, 6 Nov 2022 15:05:10 +0530 Subject: [PATCH 1/6] for #49508 changing Doc for DataFrame.astype added the series in input in the doc of DataFrame.astype --- pandas/core/generic.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 4a0f31357079f..0478aaf990710 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 : string, data type, Series or Mapping of column name -> data type + Use a data type like object (string, numpy.dtype, pandas.ExtensionDtype + 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. 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 From 74e4037b6b3740ce281b2fbd14163472419ddbc0 Mon Sep 17 00:00:00 2001 From: ram vikram singh Date: Sun, 6 Nov 2022 16:45:52 +0530 Subject: [PATCH 2/6] up --- pandas/core/generic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 0478aaf990710..0a15d47d92cf1 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -6007,7 +6007,7 @@ def astype( dtype : string, data type, Series or Mapping of column name -> data type Use a data type like object (string, numpy.dtype, pandas.ExtensionDtype 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 + 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. copy : bool, default True From 6a1b39b5c83329d5803f9f747a7254aceae49dab Mon Sep 17 00:00:00 2001 From: ram vikram singh Date: Tue, 8 Nov 2022 01:10:25 +0530 Subject: [PATCH 3/6] up2 --- pandas/core/generic.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 0a15d47d92cf1..2e3d31a6c80e1 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -6005,9 +6005,9 @@ def astype( Parameters ---------- dtype : string, data type, Series or Mapping of column name -> data type - Use a data type like object (string, numpy.dtype, pandas.ExtensionDtype - 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 + Use a string, 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 From 61b143fc3883bedf567ae2c6a591f2e82e91df78 Mon Sep 17 00:00:00 2001 From: ram vikram singh Date: Tue, 8 Nov 2022 01:12:19 +0530 Subject: [PATCH 4/6] up3 --- pandas/core/generic.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 2e3d31a6c80e1..e631f524d18d0 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -6005,9 +6005,9 @@ def astype( Parameters ---------- dtype : string, data type, Series or Mapping of column name -> data type - Use a string, 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 + Use a string, 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 From ba69fd5a292693975f21476bc9f4655cdd17b0af Mon Sep 17 00:00:00 2001 From: ram vikram singh Date: Thu, 10 Nov 2022 00:30:09 +0530 Subject: [PATCH 5/6] up4 --- pandas/core/generic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index e631f524d18d0..69af177d5ab1a 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -6007,8 +6007,8 @@ def astype( dtype : string, data type, Series or Mapping of column name -> data type Use a string, 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 + 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 From 20141a7a5af02d10ebcc0f2daef4409eda36eb33 Mon Sep 17 00:00:00 2001 From: ram vikram singh Date: Fri, 11 Nov 2022 02:10:54 +0530 Subject: [PATCH 6/6] up5 --- pandas/core/generic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 50b360533534a..04055cd16f106 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -6004,8 +6004,8 @@ def astype( Parameters ---------- - dtype : string, data type, Series or Mapping of column name -> data type - Use a string, numpy.dtype, pandas.ExtensionDtype or Python type to + 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