@@ -2626,7 +2626,7 @@ class TestDataFrameGroupByPlots(TestPlotBase):
2626
2626
def test_boxplot (self ):
2627
2627
grouped = self .hist_df .groupby (by = 'gender' )
2628
2628
axes = _check_plot_works (grouped .boxplot , return_type = 'axes' )
2629
- self ._check_axes_shape (axes .values (), axes_num = 2 , layout = (1 , 2 ))
2629
+ self ._check_axes_shape (list ( axes .values () ), axes_num = 2 , layout = (1 , 2 ))
2630
2630
2631
2631
axes = _check_plot_works (grouped .boxplot , subplots = False ,
2632
2632
return_type = 'axes' )
@@ -2638,15 +2638,15 @@ def test_boxplot(self):
2638
2638
2639
2639
grouped = df .groupby (level = 1 )
2640
2640
axes = _check_plot_works (grouped .boxplot , return_type = 'axes' )
2641
- self ._check_axes_shape (axes .values (), axes_num = 10 , layout = (4 , 3 ))
2641
+ self ._check_axes_shape (list ( axes .values () ), axes_num = 10 , layout = (4 , 3 ))
2642
2642
2643
2643
axes = _check_plot_works (grouped .boxplot , subplots = False ,
2644
2644
return_type = 'axes' )
2645
2645
self ._check_axes_shape (axes , axes_num = 1 , layout = (1 , 1 ))
2646
2646
2647
2647
grouped = df .unstack (level = 1 ).groupby (level = 0 , axis = 1 )
2648
2648
axes = _check_plot_works (grouped .boxplot , return_type = 'axes' )
2649
- self ._check_axes_shape (axes .values (), axes_num = 3 , layout = (2 , 2 ))
2649
+ self ._check_axes_shape (list ( axes .values () ), axes_num = 3 , layout = (2 , 2 ))
2650
2650
2651
2651
axes = _check_plot_works (grouped .boxplot , subplots = False ,
2652
2652
return_type = 'axes' )
@@ -2823,14 +2823,14 @@ def test_grouped_box_multiple_axes(self):
2823
2823
fig , axes = self .plt .subplots (2 , 3 )
2824
2824
returned = df .boxplot (column = ['height' , 'weight' , 'category' ], by = 'gender' ,
2825
2825
return_type = 'axes' , ax = axes [0 ])
2826
- returned = np .array (returned .values ())
2826
+ returned = np .array (list ( returned .values () ))
2827
2827
self ._check_axes_shape (returned , axes_num = 3 , layout = (1 , 3 ))
2828
2828
self .assert_numpy_array_equal (returned , axes [0 ])
2829
2829
self .assertIs (returned [0 ].figure , fig )
2830
2830
# draw on second row
2831
2831
returned = df .groupby ('classroom' ).boxplot (column = ['height' , 'weight' , 'category' ],
2832
2832
return_type = 'axes' , ax = axes [1 ])
2833
- returned = np .array (returned .values ())
2833
+ returned = np .array (list ( returned .values () ))
2834
2834
self ._check_axes_shape (returned , axes_num = 3 , layout = (1 , 3 ))
2835
2835
self .assert_numpy_array_equal (returned , axes [1 ])
2836
2836
self .assertIs (returned [0 ].figure , fig )
0 commit comments