@@ -3046,19 +3046,51 @@ def barh(self, x=None, y=None, **kwds):
3046
3046
3047
3047
def box (self , by = None , ** kwds ):
3048
3048
r"""
3049
- Boxplot
3049
+ Make a box plot of the DataFrame columns.
3050
+
3051
+ A box plot is a method for graphically depicting groups of numerical
3052
+ data through their quartiles.
3053
+ The box extends from the Q1 to Q3 quartile values of the data,
3054
+ with a line at the median (Q2). The whiskers extend from the edges
3055
+ of box to show the range of the data. The position of the whiskers
3056
+ is set by default to 1.5*IQR (IQR = Q3 - Q1) from the edges of the
3057
+ box. Outlier points are those past the end of the whiskers.
3058
+
3059
+ For further details see Wikipedia's
3060
+ entry for `boxplot <https://en.wikipedia.org/wiki/Box_plot>`__.
3061
+
3062
+ A consideration when using this chart is that the box and the whiskers
3063
+ can overlap, which is very common when plotting small sets of data.
3050
3064
3051
3065
Parameters
3052
3066
----------
3053
3067
by : string or sequence
3054
3068
Column in the DataFrame to group by.
3055
- ` **kwds` : optional
3056
- Additional keyword arguments are documented in
3069
+ **kwds : optional
3070
+ Additional keywords are documented in
3057
3071
:meth:`pandas.DataFrame.plot`.
3058
3072
3059
3073
Returns
3060
3074
-------
3061
3075
axes : :class:`matplotlib.axes.Axes` or numpy.ndarray of them
3076
+
3077
+ See Also
3078
+ --------
3079
+ pandas.DataFrame.boxplot: Another method to draw a box plot.
3080
+ pandas.Series.plot.box: Draw a box plot from a Series object.
3081
+ matplotlib.pyplot.boxplot: Draw a box plot in matplotlib.
3082
+
3083
+ Examples
3084
+ --------
3085
+ Draw a box plot from a DataFrame with four columns of randomly
3086
+ generated data.
3087
+
3088
+ .. plot::
3089
+ :context: close-figs
3090
+
3091
+ >>> data = np.random.randn(25, 4)
3092
+ >>> df = pd.DataFrame(data, columns=list('ABCD'))
3093
+ >>> ax = df.plot.box()
3062
3094
"""
3063
3095
return self (kind = 'box' , by = by , ** kwds )
3064
3096
0 commit comments