@@ -3031,19 +3031,46 @@ def barh(self, x=None, y=None, **kwds):
3031
3031
3032
3032
def box (self , by = None , ** kwds ):
3033
3033
r"""
3034
- Boxplot
3034
+ Make a box plot of the DataFrame columns.
3035
+
3036
+ This method draws a box and whisker for each series in the DataFrame
3037
+ in a single chart. The boxes share the vertical axis, which
3038
+ makes makes it easier to compare if they are similar in scale.
3039
+ Box plots are useful because they clearly show the median,
3040
+ quartiles and flier points in the data.
3041
+
3042
+ A consideration when using this chart is that the box and the whiskers
3043
+ can overlap, which is very common when plotting small sets of data.
3035
3044
3036
3045
Parameters
3037
3046
----------
3038
3047
by : string or sequence
3039
3048
Column in the DataFrame to group by.
3040
- ` **kwds` : optional
3041
- Additional keyword arguments are documented in
3049
+ **kwds : optional
3050
+ Additional keywords are documented in
3042
3051
:meth:`pandas.DataFrame.plot`.
3043
3052
3044
3053
Returns
3045
3054
-------
3046
3055
axes : :class:`matplotlib.axes.Axes` or numpy.ndarray of them
3056
+
3057
+ See Also
3058
+ --------
3059
+ :meth:`pandas.DataFrame.boxplot` : Another method to draw a box plot.
3060
+ :meth:`pandas.Series.plot.box` : Draw a box plot from a Series object.
3061
+ :func:`matplotlib.pyplot.boxplot`: Draw a box plot in matplotlib.
3062
+
3063
+ Examples
3064
+ --------
3065
+ Draw a box plot from a DataFrame with four columns of randomly
3066
+ generated data.
3067
+
3068
+ .. plot::
3069
+ :context: close-figs
3070
+
3071
+ >>> data = np.random.randint(0, 10, size=(25, 4))
3072
+ >>> df = pd.DataFrame(data, columns=list('ABCD'))
3073
+ >>> plot = df.plot.box()
3047
3074
"""
3048
3075
return self (kind = 'box' , by = by , ** kwds )
3049
3076
0 commit comments