Movatterモバイル変換


[0]ホーム

URL:


Navigation

Table Of Contents

Search

Enter search terms or a module, class or function name.

pandas.DataFrame.boxplot

DataFrame.boxplot(column=None,by=None,ax=None,fontsize=None,rot=0,grid=True,figsize=None,layout=None,return_type=None,**kwds)[source]

Make a box plot from DataFrame column optionally grouped by some columns orother inputs

Parameters:

data : the pandas object holding the data

column : column name or list of names, or vector

Can be any valid input to groupby

by : string or sequence

Column in the DataFrame to group by

ax : Matplotlib axes object, optional

fontsize : int or string

rot : label rotation angle

figsize : A tuple (width, height) in inches

grid : Setting this to True will show the grid

layout : tuple (optional)

(rows, columns) for the layout of the plot

return_type : {None, ‘axes’, ‘dict’, ‘both’}, default None

The kind of object to return. The default isaxes‘axes’ returns the matplotlib axes the boxplot is drawn on;‘dict’ returns a dictionary whose values are the matplotlibLines of the boxplot;‘both’ returns a namedtuple with the axes and dict.

When grouping withby, a Series mapping columns toreturn_typeis returned, unlessreturn_type is None, in which case a NumPyarray of axes is returned with the same shape aslayout.See the prose documentation for more.

kwds : other plotting keyword arguments to be passed to matplotlib boxplot

function

Returns:

lines : dict

ax : matplotlib Axes

(ax, lines): namedtuple

Notes

Usereturn_type='dict' when you want to tweak the appearanceof the lines after plotting. In this case a dict containing the Linesmaking up the boxes, caps, fliers, medians, and whiskers is returned.

Navigation

Scroll To Top
[8]ページ先頭

©2009-2025 Movatter.jp