@@ -2115,24 +2115,25 @@ def plot_series(data, kind='line', ax=None, # Series unique
2115
2115
returned by `boxplot`. When ``return_type='axes'`` is selected,
2116
2116
the matplotlib axes on which the boxplot is drawn are returned:
2117
2117
2118
- >>> df.boxplot(column=['Col1','Col2'], return_type='axes')
2119
- <matplotlib.axes._subplots.AxesSubplot object at ...>
2118
+ >>> boxplot = df.boxplot(column=['Col1','Col2'], return_type='axes')
2119
+ >>> type(boxplot)
2120
+ <class 'matplotlib.axes._subplots.AxesSubplot'>
2120
2121
2121
2122
When grouping with ``by``, a Series mapping columns to ``return_type``
2122
2123
is returned:
2123
2124
2124
- >>> df.boxplot(column=['Col1','Col2'], by='X', return_type='axes')
2125
- Col1 AxesSubplot(0.1,0.15;0.363636x0.75 )
2126
- Col2 AxesSubplot(0.536364,0.15;0.363636x0.75 )
2127
- dtype: object
2125
+ >>> boxplot = df.boxplot(column=['Col1','Col2'], by='X',
2126
+ ... return_type='axes' )
2127
+ >>> type(boxplot )
2128
+ <class 'pandas.core.series.Series'>
2128
2129
2129
2130
If ``return_type`` is `None`, a NumPy array of axes with the same shape
2130
2131
as ``layout`` is returned:
2131
2132
2132
- >>> df.boxplot(column=['Col1','Col2'], by='X', return_type=None)
2133
- array([<matplotlib.axes._subplots.AxesSubplot object at ...>,
2134
- <matplotlib.axes._subplots.AxesSubplot object at ...>],
2135
- dtype=object)
2133
+ >>> boxplot = df.boxplot(column=['Col1','Col2'], by='X',
2134
+ ... return_type=None)
2135
+ >>> type(boxplot)
2136
+ <class 'numpy.ndarray'>
2136
2137
"""
2137
2138
2138
2139
0 commit comments