From 43c7a45ffbe941a0721585b00c317ce89f60f6d9 Mon Sep 17 00:00:00 2001 From: Will Song <16807975+WillySong@users.noreply.github.com> Date: Mon, 9 Mar 2020 09:01:24 -0400 Subject: [PATCH 01/11] errorchecking for get_group I can't believe it took me all night to understand and debug this. --- pandas/core/groupby/groupby.py | 60 ++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index 6362f11a3e032..8d98aaf0d0fed 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -685,6 +685,16 @@ def get_group(self, name, obj=None): if not len(inds): raise KeyError(name) + for index in inds: + for i in range(len(self.keys)): + key = self.keys[i] + # if the cell does not contain the searched for data + if (type(name) != tuple): + if obj.iloc[index, :][key] != name: + raise KeyError(name) + elif obj.iloc[index, :][key] != name[i]: + raise KeyError(name) + return obj._take_with_is_copy(inds, axis=self.axis) def __iter__(self): @@ -2584,3 +2594,53 @@ def get_groupby( observed=observed, mutated=mutated, ) + +if (__name__ == "__main__"): + + + + df = DataFrame(data={ + 'A': ['a1', 'a2', None], + 'B': ['b1', 'b2', 'b1'], + 'val': [1, 2, 3], + }) + print(df) + print("="*40) + print("Test One:") + print("="*40) + grps = df.groupby(by=['A', 'B']) + print("Live Expected", "="*30) + print(grps.get_group(('a1', 'b1'))) + print("Live Bug", "="*30) + print(grps.get_group(('a2', 'b1'))) + print("Dev Expected", "="*30) + print(_GroupBy.get_group(grps, ('a1', 'b1'))) + print("Dev Bugfix", "="*30) + print(_GroupBy.get_group(grps, ('a2', 'b1'))) + + # df = DataFrame({'Animal': ['Falcon', 'Falcon', + # 'Parrot', 'Parrot'], + # 'Max Speed': [380., 370., 24., 26.], + # 'bullshit': ['a', 'b', 'c', 'd']}) + # + # print(df) + # grps = df.groupby(['Animal']) + # print(_GroupBy.get_group(grps, ('Falcon'))) + # print("=====") + # i = 0 + # for key, item in grps: + # print(i) + # i +=1 + # print(key) + # print(_GroupBy.get_group(grps, key)) + # print(grps) + # print(grps.mean()) + # print("=====") + print("=" * 40) + print("Test Two:") + print("=" * 40) + grps = df.groupby(by=['B']) + print("Live Expected", "=" * 30) + print(grps.get_group(('b1'))) + print("Dev Exepected", "=" * 30) + print(_GroupBy.get_group(grps, ('b1'))) From 85dbf1f40004fd7ea9683fd0aa1f236fdcc68f23 Mon Sep 17 00:00:00 2001 From: Will Song <16807975+WillySong@users.noreply.github.com> Date: Mon, 9 Mar 2020 19:13:18 -0400 Subject: [PATCH 02/11] style fixes --- pandas/core/groupby/groupby.py | 50 ---------------------------------- 1 file changed, 50 deletions(-) diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index 8d98aaf0d0fed..25f8e8bd46142 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -2594,53 +2594,3 @@ def get_groupby( observed=observed, mutated=mutated, ) - -if (__name__ == "__main__"): - - - - df = DataFrame(data={ - 'A': ['a1', 'a2', None], - 'B': ['b1', 'b2', 'b1'], - 'val': [1, 2, 3], - }) - print(df) - print("="*40) - print("Test One:") - print("="*40) - grps = df.groupby(by=['A', 'B']) - print("Live Expected", "="*30) - print(grps.get_group(('a1', 'b1'))) - print("Live Bug", "="*30) - print(grps.get_group(('a2', 'b1'))) - print("Dev Expected", "="*30) - print(_GroupBy.get_group(grps, ('a1', 'b1'))) - print("Dev Bugfix", "="*30) - print(_GroupBy.get_group(grps, ('a2', 'b1'))) - - # df = DataFrame({'Animal': ['Falcon', 'Falcon', - # 'Parrot', 'Parrot'], - # 'Max Speed': [380., 370., 24., 26.], - # 'bullshit': ['a', 'b', 'c', 'd']}) - # - # print(df) - # grps = df.groupby(['Animal']) - # print(_GroupBy.get_group(grps, ('Falcon'))) - # print("=====") - # i = 0 - # for key, item in grps: - # print(i) - # i +=1 - # print(key) - # print(_GroupBy.get_group(grps, key)) - # print(grps) - # print(grps.mean()) - # print("=====") - print("=" * 40) - print("Test Two:") - print("=" * 40) - grps = df.groupby(by=['B']) - print("Live Expected", "=" * 30) - print(grps.get_group(('b1'))) - print("Dev Exepected", "=" * 30) - print(_GroupBy.get_group(grps, ('b1'))) From 28f5a2bcf0eae5fed3fa80fe017221490d61eab4 Mon Sep 17 00:00:00 2001 From: Dax Patel Date: Tue, 10 Mar 2020 04:15:40 -0400 Subject: [PATCH 03/11] ran black pandas to enforce pep8 --- pandas/core/groupby/groupby.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index 25f8e8bd46142..a06e0f33282c3 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -689,7 +689,7 @@ def get_group(self, name, obj=None): for i in range(len(self.keys)): key = self.keys[i] # if the cell does not contain the searched for data - if (type(name) != tuple): + if type(name) != tuple: if obj.iloc[index, :][key] != name: raise KeyError(name) elif obj.iloc[index, :][key] != name[i]: From 47fa08f0cdb40a301178f211f5513cead061fd41 Mon Sep 17 00:00:00 2001 From: Will Song <16807975+WillySong@users.noreply.github.com> Date: Tue, 10 Mar 2020 22:33:48 -0400 Subject: [PATCH 04/11] error checking for the error check --- pandas/core/groupby/groupby.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index a06e0f33282c3..ef9a404ac721b 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -685,15 +685,21 @@ def get_group(self, name, obj=None): if not len(inds): raise KeyError(name) - for index in inds: - for i in range(len(self.keys)): - key = self.keys[i] - # if the cell does not contain the searched for data - if type(name) != tuple: - if obj.iloc[index, :][key] != name: - raise KeyError(name) - elif obj.iloc[index, :][key] != name[i]: - raise KeyError(name) + try: + isValid = False + for index in inds: + for i in range(len(self.keys)): + key = self.keys[i] + # if the cell does not contain the searched for data + if (type(name) != tuple): + if obj.iloc[index, :][key] != name: + isValid = True + elif obj.iloc[index, :][key] != name[i]: + isValid = True + except: + pass + else: + if not isValid: raise KeyError(name) return obj._take_with_is_copy(inds, axis=self.axis) From 7285bfe78493fb71cf116a5b84820a8c56c30104 Mon Sep 17 00:00:00 2001 From: Will Song <16807975+WillySong@users.noreply.github.com> Date: Tue, 10 Mar 2020 23:00:44 -0400 Subject: [PATCH 05/11] Create internal get_group test file 2 tests completed of (estimated) 8 --- pandas/core/groupby/_test_get_groups.py | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 pandas/core/groupby/_test_get_groups.py diff --git a/pandas/core/groupby/_test_get_groups.py b/pandas/core/groupby/_test_get_groups.py new file mode 100644 index 0000000000000..05632d64b78ec --- /dev/null +++ b/pandas/core/groupby/_test_get_groups.py @@ -0,0 +1,35 @@ +# DO NOT MERGE _test_get_groups.py WITH THE MAIN PANDAS REPO!!! +# DO NOT MERGE _test_get_groups.py WITH THE MAIN PANDAS REPO!!! +# DO NOT MERGE _test_get_groups.py WITH THE MAIN PANDAS REPO!!! + +# run with python3 _test_get_groups.py + +import unittest + +from pandas import DataFrame +from pandas.testing import assert_frame_equal + + +class _test_get_groups(unittest.TestCase): + def test_single_row_valid(self): + df = DataFrame(data={ + 'A': ['a1', 'a2', None], + 'B': ['b1', 'b2', 'b1'], + 'val': [1, 2, 3], + }) + expected = DataFrame(data={ + 'A': ['a1'], + 'B': ['b1'], + 'val': [1,], + }) + grps = df.groupby(by=['A', 'B']) + assert_frame_equal(grps.get_group(('a1', 'b1')), expected) + + def test_discovered_invalid(self): + df = DataFrame(data={ + 'A': ['a1', 'a2', None], + 'B': ['b1', 'b2', 'b1'], + 'val': [1, 2, 3], + }) + grps = df.groupby(by=['A', 'B']) + self.assertRaises(KeyError, grps.get_group, ('a1', 'b2')) From 9f51b8c1e34fff5976241643c7e32b40b055a90d Mon Sep 17 00:00:00 2001 From: Will Song <16807975+WillySong@users.noreply.github.com> Date: Wed, 11 Mar 2020 01:26:33 -0400 Subject: [PATCH 06/11] fixing the bugfix i can't read nor develop. --- pandas/core/groupby/groupby.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index ef9a404ac721b..86a7d115b14a9 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -686,16 +686,18 @@ def get_group(self, name, obj=None): raise KeyError(name) try: - isValid = False + isValid = True for index in inds: for i in range(len(self.keys)): key = self.keys[i] # if the cell does not contain the searched for data if (type(name) != tuple): if obj.iloc[index, :][key] != name: - isValid = True + isValid = False elif obj.iloc[index, :][key] != name[i]: - isValid = True + isValid = False + else: + isValid = isValid and True except: pass else: @@ -2600,3 +2602,4 @@ def get_groupby( observed=observed, mutated=mutated, ) + From 438181ae3351437f4088be6d2c37469c9552c756 Mon Sep 17 00:00:00 2001 From: Will Song <16807975+WillySong@users.noreply.github.com> Date: Wed, 11 Mar 2020 01:35:09 -0400 Subject: [PATCH 07/11] more tests with proper ordering --- pandas/core/groupby/_test_get_groups.py | 68 +++++++++++++++++++++---- 1 file changed, 59 insertions(+), 9 deletions(-) diff --git a/pandas/core/groupby/_test_get_groups.py b/pandas/core/groupby/_test_get_groups.py index 05632d64b78ec..791dcf0622ab6 100644 --- a/pandas/core/groupby/_test_get_groups.py +++ b/pandas/core/groupby/_test_get_groups.py @@ -1,17 +1,49 @@ -# DO NOT MERGE _test_get_groups.py WITH THE MAIN PANDAS REPO!!! -# DO NOT MERGE _test_get_groups.py WITH THE MAIN PANDAS REPO!!! -# DO NOT MERGE _test_get_groups.py WITH THE MAIN PANDAS REPO!!! - -# run with python3 _test_get_groups.py - import unittest from pandas import DataFrame from pandas.testing import assert_frame_equal +import numpy as np +# +# # df = DataFrame({'Animal': ['Falcon', 'Falcon', +# # 'Parrot', 'Parrot'], +# # 'Max Speed': [380., 370., 24., 26.], +# # 'bullshit': ['a', 'b', 'c', 'd']}) +# # +# # print(df) +# # grps = df.groupby(['Animal']) +# # print(_GroupBy.get_group(grps, ('Falcon'))) +# # print("=====") +# # i = 0 +# # for key, item in grps: +# # print(i) +# # i +=1 +# # print(key) +# # print(_GroupBy.get_group(grps, key)) +# # print(grps) +# # print(grps.mean()) +# # print("=====") +# +# d = { +# "cat": pd.Categorical( +# ["a", "b", "a", "b"], categories=["a", "b", "c"], ordered=True +# ), +# "ints": [1, 1, 2, 2], +# "val": [10, 20, 30, 40], +# } +# df = pd.DataFrame(d) class _test_get_groups(unittest.TestCase): - def test_single_row_valid(self): + def test_cero_discovered_invalid(self): + df = DataFrame(data={ + 'A': ['a1', 'a2', None], + 'B': ['b1', 'b2', 'b1'], + 'val': [1, 2, 3], + }) + grps = df.groupby(by=['A', 'B']) + self.assertRaises(KeyError, grps.get_group, ('a1', 'b2')) + + def test_uno_single_row_valid(self): df = DataFrame(data={ 'A': ['a1', 'a2', None], 'B': ['b1', 'b2', 'b1'], @@ -25,11 +57,29 @@ def test_single_row_valid(self): grps = df.groupby(by=['A', 'B']) assert_frame_equal(grps.get_group(('a1', 'b1')), expected) - def test_discovered_invalid(self): + def test_dos_alternate_invalid(self): df = DataFrame(data={ 'A': ['a1', 'a2', None], 'B': ['b1', 'b2', 'b1'], 'val': [1, 2, 3], }) grps = df.groupby(by=['A', 'B']) - self.assertRaises(KeyError, grps.get_group, ('a1', 'b2')) + self.assertRaises(KeyError, grps.get_group, ('a2', 'b1')) + + def test_tres_double_row_valid(self): + df = DataFrame(data={ + 'A': ['a1', 'a2', None], + 'B': ['b1', 'b2', 'b1'], + 'val': [1, 2, 3], + }) + expected = DataFrame(data={ + 'A': ['a1', None], + 'B': ['b1', 'b1'], + 'val': [1, 3], + }) + grps = df.groupby(by=['B']) + self.assertEqual(True, np.array_equal(grps.get_group(('b1')).values, expected.values)) + + +if __name__ == '__main__': + unittest.main() From f8332acbe8e19171c1c6df8ece952f78e365e389 Mon Sep 17 00:00:00 2001 From: Will Song <16807975+WillySong@users.noreply.github.com> Date: Wed, 11 Mar 2020 01:50:32 -0400 Subject: [PATCH 08/11] more test cases added six of hopeful 8. Covered all I can think of. empty doesn't work --- pandas/core/groupby/_test_get_groups.py | 54 ++++++++++++------------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/pandas/core/groupby/_test_get_groups.py b/pandas/core/groupby/_test_get_groups.py index 791dcf0622ab6..8110a83ec2269 100644 --- a/pandas/core/groupby/_test_get_groups.py +++ b/pandas/core/groupby/_test_get_groups.py @@ -1,38 +1,13 @@ +# DO NOT MERGE _test_get_groups.py WITH ACTUAL PANDAS +# DO NOT MERGE _test_get_groups.py WITH ACTUAL PANDAS +# DO NOT MERGE _test_get_groups.py WITH ACTUAL PANDAS + import unittest from pandas import DataFrame from pandas.testing import assert_frame_equal import numpy as np -# -# # df = DataFrame({'Animal': ['Falcon', 'Falcon', -# # 'Parrot', 'Parrot'], -# # 'Max Speed': [380., 370., 24., 26.], -# # 'bullshit': ['a', 'b', 'c', 'd']}) -# # -# # print(df) -# # grps = df.groupby(['Animal']) -# # print(_GroupBy.get_group(grps, ('Falcon'))) -# # print("=====") -# # i = 0 -# # for key, item in grps: -# # print(i) -# # i +=1 -# # print(key) -# # print(_GroupBy.get_group(grps, key)) -# # print(grps) -# # print(grps.mean()) -# # print("=====") -# -# d = { -# "cat": pd.Categorical( -# ["a", "b", "a", "b"], categories=["a", "b", "c"], ordered=True -# ), -# "ints": [1, 1, 2, 2], -# "val": [10, 20, 30, 40], -# } -# df = pd.DataFrame(d) - class _test_get_groups(unittest.TestCase): def test_cero_discovered_invalid(self): df = DataFrame(data={ @@ -80,6 +55,27 @@ def test_tres_double_row_valid(self): grps = df.groupby(by=['B']) self.assertEqual(True, np.array_equal(grps.get_group(('b1')).values, expected.values)) + def test_cuatro_expect_empty(self): + df = DataFrame(data={ + 'A': ['a1', 'a2', None], + 'B': ['b1', 'b2', 'b1'], + 'val': [1, 2, 3], + }) + grps = df.groupby(by=['B']) + self.assertRaises(KeyError, grps.get_group, ('b3')) + + def test_cinco_double_row_valid(self): + df = DataFrame({'Animal': ['Falcon', 'Falcon', + 'Parrot', 'Parrot'], + 'Max Speed': [380., 370., 24., 26.], + 'bullshit': ['a', 'b', 'c', 'd']}) + expected = DataFrame({'Animal': ['Falcon', 'Falcon'], + 'Max Speed': [380., 370.], + 'bullshit': ['a', 'b']}) + grps = df.groupby(['Animal']) + assert_frame_equal(grps.get_group(('Falcon')), expected) + + if __name__ == '__main__': unittest.main() From eddf0fb8630984d4e44dbd9438aaa229b96d8077 Mon Sep 17 00:00:00 2001 From: Julia Date: Wed, 11 Mar 2020 02:30:45 -0400 Subject: [PATCH 09/11] Added more test cases --- pandas/core/groupby/_test_get_groups.py | 46 ++++++++++++++++++++----- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/pandas/core/groupby/_test_get_groups.py b/pandas/core/groupby/_test_get_groups.py index 8110a83ec2269..24a79615f1c9b 100644 --- a/pandas/core/groupby/_test_get_groups.py +++ b/pandas/core/groupby/_test_get_groups.py @@ -1,6 +1,6 @@ -# DO NOT MERGE _test_get_groups.py WITH ACTUAL PANDAS -# DO NOT MERGE _test_get_groups.py WITH ACTUAL PANDAS -# DO NOT MERGE _test_get_groups.py WITH ACTUAL PANDAS +# DO NOT MERGE _test_get_groups.py WITH ACTUAL PANDAS +# DO NOT MERGE _test_get_groups.py WITH ACTUAL PANDAS +# DO NOT MERGE _test_get_groups.py WITH ACTUAL PANDAS import unittest @@ -9,7 +9,7 @@ import numpy as np class _test_get_groups(unittest.TestCase): - def test_cero_discovered_invalid(self): + def test_discovered_invalid(self): df = DataFrame(data={ 'A': ['a1', 'a2', None], 'B': ['b1', 'b2', 'b1'], @@ -18,7 +18,7 @@ def test_cero_discovered_invalid(self): grps = df.groupby(by=['A', 'B']) self.assertRaises(KeyError, grps.get_group, ('a1', 'b2')) - def test_uno_single_row_valid(self): + def test_single_row_valid(self): df = DataFrame(data={ 'A': ['a1', 'a2', None], 'B': ['b1', 'b2', 'b1'], @@ -32,7 +32,7 @@ def test_uno_single_row_valid(self): grps = df.groupby(by=['A', 'B']) assert_frame_equal(grps.get_group(('a1', 'b1')), expected) - def test_dos_alternate_invalid(self): + def test_alternate_invalid(self): df = DataFrame(data={ 'A': ['a1', 'a2', None], 'B': ['b1', 'b2', 'b1'], @@ -41,7 +41,7 @@ def test_dos_alternate_invalid(self): grps = df.groupby(by=['A', 'B']) self.assertRaises(KeyError, grps.get_group, ('a2', 'b1')) - def test_tres_double_row_valid(self): + def test_double_row_valid(self): df = DataFrame(data={ 'A': ['a1', 'a2', None], 'B': ['b1', 'b2', 'b1'], @@ -55,7 +55,7 @@ def test_tres_double_row_valid(self): grps = df.groupby(by=['B']) self.assertEqual(True, np.array_equal(grps.get_group(('b1')).values, expected.values)) - def test_cuatro_expect_empty(self): + def test_expect_empty(self): df = DataFrame(data={ 'A': ['a1', 'a2', None], 'B': ['b1', 'b2', 'b1'], @@ -64,7 +64,7 @@ def test_cuatro_expect_empty(self): grps = df.groupby(by=['B']) self.assertRaises(KeyError, grps.get_group, ('b3')) - def test_cinco_double_row_valid(self): + def test_double_row_valid(self): df = DataFrame({'Animal': ['Falcon', 'Falcon', 'Parrot', 'Parrot'], 'Max Speed': [380., 370., 24., 26.], @@ -75,7 +75,35 @@ def test_cinco_double_row_valid(self): grps = df.groupby(['Animal']) assert_frame_equal(grps.get_group(('Falcon')), expected) + def test_multi_group_multi_result(self): + df = DataFrame([('bird', 'Falconiformes', 389.0), + ('bird', 'Psittaciformes', 24.0), + ('mammal', 'Carnivora', 80.2), + ('mammal', 'Primates', None), + ('mammal', 'Carnivora', 58)], + index=['falcon', 'parrot', 'lion', 'monkey', 'leopard'], + columns=('class', 'order', 'max_speed')) + expected = DataFrame([('mammal', 'Carnivora', 80.2), + ('mammal', 'Carnivora', 58)], + index=['lion', 'leopard'], + columns=('class', 'order', 'max_speed')) + grps = df.groupby(['class', 'order']); + assert_frame_equal(grps.get_group(('mammal','Carnivora')), expected) + def test_single_group_no_tuple(self): + df = DataFrame([('bird', 'Falconiformes', 389.0), + ('bird', 'Psittaciformes', 24.0), + ('mammal', 'Carnivora', 80.2), + ('mammal', 'Primates', None), + ('mammal', 'Carnivora', 58)], + index=['falcon', 'parrot', 'lion', 'monkey', 'leopard'], + columns=('class', 'order', 'max_speed')) + expected = DataFrame([('bird', 'Falconiformes', 389.0), + ('bird', 'Psittaciformes', 24.0)], + index=['falcon', 'parrot'], + columns=('class', 'order', 'max_speed')) + grps = df.groupby(['class']); + assert_frame_equal(grps.get_group('bird'), expected) if __name__ == '__main__': unittest.main() From ce2297665094e6bea7d9a187d815c8c45a6551cc Mon Sep 17 00:00:00 2001 From: Will Song <16807975+WillySong@users.noreply.github.com> Date: Wed, 11 Mar 2020 13:42:31 -0400 Subject: [PATCH 10/11] black styling compliance --- pandas/core/groupby/groupby.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index 86a7d115b14a9..f73ee88f06af7 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -698,10 +698,11 @@ def get_group(self, name, obj=None): isValid = False else: isValid = isValid and True - except: + except TypeError: pass else: - if not isValid: raise KeyError(name) + if not isValid: + raise KeyError(name) return obj._take_with_is_copy(inds, axis=self.axis) @@ -2602,4 +2603,3 @@ def get_groupby( observed=observed, mutated=mutated, ) - From 449cf6398f97f33c0b67a96ca57efd05d70cf110 Mon Sep 17 00:00:00 2001 From: Will Song <16807975+WillySong@users.noreply.github.com> Date: Wed, 11 Mar 2020 13:48:21 -0400 Subject: [PATCH 11/11] Added GroupBy.get_group bugfix --- doc/source/whatsnew/v1.1.0.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/source/whatsnew/v1.1.0.rst b/doc/source/whatsnew/v1.1.0.rst index 44deab25db695..f0c7231ca8f16 100644 --- a/doc/source/whatsnew/v1.1.0.rst +++ b/doc/source/whatsnew/v1.1.0.rst @@ -309,6 +309,11 @@ Plotting - - Bug in :meth:`DataFrame.boxplot` and :meth:`DataFrame.plot.boxplot` lost color attributes of ``medianprops``, ``whiskerprops``, ``capprops`` and ``medianprops`` (:issue:`30346`) +Groupby +^^^^^^^ + +- Bug in :meth:`GroupBy.get_group` raises ``KeyError`` when a ``name`` that does not exist is searched for (:issue:`32492`) + Groupby/resample/rolling ^^^^^^^^^^^^^^^^^^^^^^^^