From 454216e4400dfb3a2710e35a94940af8a10d0fc6 Mon Sep 17 00:00:00 2001 From: anirudnits Date: Wed, 2 Oct 2019 21:05:46 +0530 Subject: [PATCH 1/2] Minor fixes in pandas/testing.py docstring --- pandas/util/testing.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandas/util/testing.py b/pandas/util/testing.py index 1c0a8dbc19ccd..d6fc77e8908e2 100644 --- a/pandas/util/testing.py +++ b/pandas/util/testing.py @@ -585,7 +585,7 @@ def assert_index_equal( ---------- left : Index right : Index - exact : bool / string {'equiv'}, default 'equiv' + exact : bool / str {'equiv'}, default 'equiv' Whether to check the Index class, dtype and inferred_type are identical. If 'equiv', then RangeIndex can be substituted for Int64Index as well. @@ -1089,7 +1089,7 @@ def assert_series_equal( right : Series check_dtype : bool, default True Whether to check the Series dtype is identical. - check_index_type : bool / string {'equiv'}, default 'equiv' + check_index_type : bool / str {'equiv'}, default 'equiv' Whether to check the Index class, dtype and inferred_type are identical. check_series_type : bool, default True @@ -1251,10 +1251,10 @@ def assert_frame_equal( Second DataFrame to compare. check_dtype : bool, default True Whether to check the DataFrame dtype is identical. - check_index_type : bool / string {'equiv'}, default 'equiv' + check_index_type : bool / str {'equiv'}, default 'equiv' Whether to check the Index class, dtype and inferred_type are identical. - check_column_type : bool / string {'equiv'}, default 'equiv' + check_column_type : bool / str {'equiv'}, default 'equiv' Whether to check the columns class, dtype and inferred_type are identical. Is passed as the ``exact`` argument of :func:`assert_index_equal`. From 8709a26d0cbd188eaeaf0a6bab984b4df7efe949 Mon Sep 17 00:00:00 2001 From: anirudnits Date: Thu, 3 Oct 2019 22:06:19 +0530 Subject: [PATCH 2/2] Made the required changes --- pandas/util/testing.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pandas/util/testing.py b/pandas/util/testing.py index d6fc77e8908e2..32f88b13ac041 100644 --- a/pandas/util/testing.py +++ b/pandas/util/testing.py @@ -294,7 +294,7 @@ def assert_almost_equal( ---------- left : object right : object - check_dtype : bool / string {'equiv'}, default 'equiv' + check_dtype : bool or {'equiv'}, default 'equiv' Check dtype if both a and b are the same type. If 'equiv' is passed in, then `RangeIndex` and `Int64Index` are also considered equivalent when doing type checking. @@ -585,7 +585,7 @@ def assert_index_equal( ---------- left : Index right : Index - exact : bool / str {'equiv'}, default 'equiv' + exact : bool or {'equiv'}, default 'equiv' Whether to check the Index class, dtype and inferred_type are identical. If 'equiv', then RangeIndex can be substituted for Int64Index as well. @@ -860,7 +860,7 @@ def assert_interval_array_equal(left, right, exact="equiv", obj="IntervalArray") ---------- left, right : IntervalArray The IntervalArrays to compare. - exact : bool / string {'equiv'}, default 'equiv' + exact : bool or {'equiv'}, default 'equiv' Whether to check the Index class, dtype and inferred_type are identical. If 'equiv', then RangeIndex can be substituted for Int64Index as well. @@ -1089,7 +1089,7 @@ def assert_series_equal( right : Series check_dtype : bool, default True Whether to check the Series dtype is identical. - check_index_type : bool / str {'equiv'}, default 'equiv' + check_index_type : bool or {'equiv'}, default 'equiv' Whether to check the Index class, dtype and inferred_type are identical. check_series_type : bool, default True @@ -1251,10 +1251,10 @@ def assert_frame_equal( Second DataFrame to compare. check_dtype : bool, default True Whether to check the DataFrame dtype is identical. - check_index_type : bool / str {'equiv'}, default 'equiv' + check_index_type : bool or {'equiv'}, default 'equiv' Whether to check the Index class, dtype and inferred_type are identical. - check_column_type : bool / str {'equiv'}, default 'equiv' + check_column_type : bool or {'equiv'}, default 'equiv' Whether to check the columns class, dtype and inferred_type are identical. Is passed as the ``exact`` argument of :func:`assert_index_equal`.