xorbits.pandas.Series.plot.hist#

Series.plot.hist(*args, **kwargs)#

Draw one histogram of the DataFrame’s columns.

A histogram is a representation of the distribution of data. This function groups the values of all given Series in the DataFrame into bins and draws all bins in one matplotlib.axes.Axes. This is useful when the DataFrame’s Series are in a similar scale.

参数
  • by (str or sequence, optional (Not supported yet)) –

    Column in the DataFrame to group by.

    在 1.4.0(pandas) 版更改: Previously, by is silently ignore and makes no groupings

  • bins (int, default 10 (Not supported yet)) – Number of histogram bins to be used.

  • **kwargs – Additional keyword arguments are documented in DataFrame.plot().

返回

class – Return a histogram plot.

返回类型

matplotlib.AxesSubplot

参见

DataFrame.hist

Draw histograms per DataFrame’s Series.

Series.hist

Draw a histogram with Series’ data.

实际案例

When we roll a die 6000 times, we expect to get each value around 1000 times. But when we roll two dice and sum the result, the distribution is going to be quite different. A histogram illustrates those distributions.

(Source code)

A grouped histogram can be generated by providing the parameter by (which can be a column name, or a list of column names):

(Source code)

This docstring was copied from pandas.plotting._core.PlotAccessor.