@@ -2791,7 +2791,7 @@ class TestDataFrameGroupByPlots(TestPlotBase):
2791
2791
def test_boxplot (self ):
2792
2792
grouped = self .hist_df .groupby (by = 'gender' )
2793
2793
axes = _check_plot_works (grouped .boxplot , return_type = 'axes' )
2794
- self ._check_axes_shape (axes .values (), axes_num = 2 , layout = (1 , 2 ))
2794
+ self ._check_axes_shape (list ( axes .values () ), axes_num = 2 , layout = (1 , 2 ))
2795
2795
2796
2796
axes = _check_plot_works (grouped .boxplot , subplots = False ,
2797
2797
return_type = 'axes' )
@@ -2803,15 +2803,15 @@ def test_boxplot(self):
2803
2803
2804
2804
grouped = df .groupby (level = 1 )
2805
2805
axes = _check_plot_works (grouped .boxplot , return_type = 'axes' )
2806
- self ._check_axes_shape (axes .values (), axes_num = 10 , layout = (4 , 3 ))
2806
+ self ._check_axes_shape (list ( axes .values () ), axes_num = 10 , layout = (4 , 3 ))
2807
2807
2808
2808
axes = _check_plot_works (grouped .boxplot , subplots = False ,
2809
2809
return_type = 'axes' )
2810
2810
self ._check_axes_shape (axes , axes_num = 1 , layout = (1 , 1 ))
2811
2811
2812
2812
grouped = df .unstack (level = 1 ).groupby (level = 0 , axis = 1 )
2813
2813
axes = _check_plot_works (grouped .boxplot , return_type = 'axes' )
2814
- self ._check_axes_shape (axes .values (), axes_num = 3 , layout = (2 , 2 ))
2814
+ self ._check_axes_shape (list ( axes .values () ), axes_num = 3 , layout = (2 , 2 ))
2815
2815
2816
2816
axes = _check_plot_works (grouped .boxplot , subplots = False ,
2817
2817
return_type = 'axes' )
@@ -2988,14 +2988,14 @@ def test_grouped_box_multiple_axes(self):
2988
2988
fig , axes = self .plt .subplots (2 , 3 )
2989
2989
returned = df .boxplot (column = ['height' , 'weight' , 'category' ], by = 'gender' ,
2990
2990
return_type = 'axes' , ax = axes [0 ])
2991
- returned = np .array (returned .values ())
2991
+ returned = np .array (list ( returned .values () ))
2992
2992
self ._check_axes_shape (returned , axes_num = 3 , layout = (1 , 3 ))
2993
2993
self .assert_numpy_array_equal (returned , axes [0 ])
2994
2994
self .assertIs (returned [0 ].figure , fig )
2995
2995
# draw on second row
2996
2996
returned = df .groupby ('classroom' ).boxplot (column = ['height' , 'weight' , 'category' ],
2997
2997
return_type = 'axes' , ax = axes [1 ])
2998
- returned = np .array (returned .values ())
2998
+ returned = np .array (list ( returned .values () ))
2999
2999
self ._check_axes_shape (returned , axes_num = 3 , layout = (1 , 3 ))
3000
3000
self .assert_numpy_array_equal (returned , axes [1 ])
3001
3001
self .assertIs (returned [0 ].figure , fig )
0 commit comments