From b044aac1f84f6349ff22337178a4ced79c303100 Mon Sep 17 00:00:00 2001 From: Ran Date: Tue, 4 Aug 2020 23:45:53 +0300 Subject: [PATCH 1/4] equals doc changes --- pandas/core/generic.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index e46fde1f59f16..05d77a55b4bb3 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -1199,11 +1199,9 @@ def equals(self, other): """ Test whether two objects contain the same elements. - This function allows two Series or DataFrames to be compared against - each other to see if they have the same shape and elements. NaNs in - the same location are considered equal. The column headers do not - need to have the same type, but the elements within the columns must - be the same dtype. + This function compares two Series or DataFrames. + checks if both have the same shape and elements. + columns must be the same dtype. Parameters ---------- @@ -1234,10 +1232,9 @@ def equals(self, other): Notes ----- - This function requires that the elements have the same dtype as their - respective elements in the other Series or DataFrame. However, the - column labels do not need to have the same type, as long as they are - still considered equal. + Header or index values may be of a different dtype. + NaN values at same positions are considered equal. + Examples -------- From cbb8d6e372cf6c1495135aead309a23643c3bb04 Mon Sep 17 00:00:00 2001 From: Ran Date: Wed, 5 Aug 2020 00:11:25 +0300 Subject: [PATCH 2/4] pep 8 fixes --- pandas/core/generic.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 05d77a55b4bb3..d2b98d5eceee8 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -1200,8 +1200,8 @@ def equals(self, other): Test whether two objects contain the same elements. This function compares two Series or DataFrames. - checks if both have the same shape and elements. - columns must be the same dtype. + checks if both have the same shape and elements. + columns must be the same dtype. Parameters ---------- @@ -1233,8 +1233,8 @@ def equals(self, other): Notes ----- Header or index values may be of a different dtype. - NaN values at same positions are considered equal. - + NaN values at same positions are considered equal. + Examples -------- From 3021bf3cc7c3bcee134c97432fecdd0cb7fc4d68 Mon Sep 17 00:00:00 2001 From: Ran Date: Wed, 5 Aug 2020 00:15:53 +0300 Subject: [PATCH 3/4] pep 8 fixes --- pandas/core/generic.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pandas/core/generic.py b/pandas/core/generic.py index d2b98d5eceee8..b45c270c294f7 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -1235,7 +1235,6 @@ def equals(self, other): Header or index values may be of a different dtype. NaN values at same positions are considered equal. - Examples -------- >>> df = pd.DataFrame({1: [10], 2: [20]}) From c5c654fa78973e276c8c8fdec33fe2147411d979 Mon Sep 17 00:00:00 2001 From: Ran Date: Wed, 5 Aug 2020 00:18:45 +0300 Subject: [PATCH 4/4] pep 8 fixes --- 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 b45c270c294f7..5c1ae1bc1e025 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -1234,7 +1234,7 @@ def equals(self, other): ----- Header or index values may be of a different dtype. NaN values at same positions are considered equal. - + Examples -------- >>> df = pd.DataFrame({1: [10], 2: [20]})