@@ -2130,24 +2130,25 @@ def plot_series(data, kind='line', ax=None, # Series unique
2130
2130
returned by `boxplot`. When ``return_type='axes'`` is selected,
2131
2131
the matplotlib axes on which the boxplot is drawn are returned:
2132
2132
2133
- >>> df.boxplot(column=['Col1','Col2'], return_type='axes')
2134
- <matplotlib.axes._subplots.AxesSubplot object at ...>
2133
+ >>> boxplot = df.boxplot(column=['Col1','Col2'], return_type='axes')
2134
+ >>> type(boxplot)
2135
+ <class 'matplotlib.axes._subplots.AxesSubplot'>
2135
2136
2136
2137
When grouping with ``by``, a Series mapping columns to ``return_type``
2137
2138
is returned:
2138
2139
2139
- >>> df.boxplot(column=['Col1','Col2'], by='X', return_type='axes')
2140
- Col1 AxesSubplot(0.1,0.15;0.363636x0.75 )
2141
- Col2 AxesSubplot(0.536364,0.15;0.363636x0.75 )
2142
- dtype: object
2140
+ >>> boxplot = df.boxplot(column=['Col1','Col2'], by='X',
2141
+ ... return_type='axes' )
2142
+ >>> type(boxplot )
2143
+ <class 'pandas.core.series.Series'>
2143
2144
2144
2145
If ``return_type`` is `None`, a NumPy array of axes with the same shape
2145
2146
as ``layout`` is returned:
2146
2147
2147
- >>> df.boxplot(column=['Col1','Col2'], by='X', return_type=None)
2148
- array([<matplotlib.axes._subplots.AxesSubplot object at ...>,
2149
- <matplotlib.axes._subplots.AxesSubplot object at ...>],
2150
- dtype=object)
2148
+ >>> boxplot = df.boxplot(column=['Col1','Col2'], by='X',
2149
+ ... return_type=None)
2150
+ >>> type(boxplot)
2151
+ <class 'numpy.ndarray'>
2151
2152
"""
2152
2153
2153
2154
0 commit comments