1111
1212from pandas .util .decorators import cache_readonly , deprecate_kwarg
1313import pandas .core .common as com
14+ from pandas .core .generic import _shared_docs , _shared_doc_kwargs
1415from pandas .core .index import MultiIndex
1516from pandas .core .series import Series , remove_na
1617from pandas .tseries .index import DatetimeIndex
1920from pandas .tseries .offsets import DateOffset
2021from pandas .compat import range , lrange , lmap , map , zip , string_types
2122import pandas .compat as compat
23+ from pandas .util .decorators import Appender
2224
2325try : # mpl optional
2426 import pandas .tseries .converter as conv
@@ -2258,16 +2260,13 @@ def plot_series(series, label=None, kind='line', use_index=True, rot=None,
22582260 return plot_obj .axes [0 ]
22592261
22602262
2261- def boxplot (data , column = None , by = None , ax = None , fontsize = None ,
2262- rot = 0 , grid = True , figsize = None , layout = None , return_type = None ,
2263- ** kwds ):
2264- """
2263+ _shared_docs ['boxplot' ] = """
22652264 Make a box plot from DataFrame column optionally grouped by some columns or
22662265 other inputs
22672266
22682267 Parameters
22692268 ----------
2270- data : DataFrame or Series
2269+ data : the pandas object holding the data
22712270 column : column name or list of names, or vector
22722271 Can be any valid input to groupby
22732272 by : string or sequence
@@ -2299,7 +2298,7 @@ def boxplot(data, column=None, by=None, ax=None, fontsize=None,
22992298
23002299 Notes
23012300 -----
2302- Use ``return_dict=True `` when you want to tweak the appearance
2301+ Use ``return_type='dict' `` when you want to tweak the appearance
23032302 of the lines after plotting. In this case a dict containing the Lines
23042303 making up the boxes, caps, fliers, medians, and whiskers is returned.
23052304 """
@@ -2315,6 +2314,7 @@ def boxplot(data, column=None, by=None, ax=None, fontsize=None,
23152314 if return_type not in valid_types :
23162315 raise ValueError ("return_type" )
23172316
2317+
23182318 from pandas import Series , DataFrame
23192319 if isinstance (data , Series ):
23202320 data = DataFrame ({'x' : data })
0 commit comments