Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
w3resource

Pandas DataFrame: plot.pie() function

DataFrame.plot.pie() function

The plot.pie() function is used to generate a pie plot

A pie plot is a proportional representation of the numerical data in a column. This function wraps matplotlib.pyplot.pie() for the specified column. If no column reference is passed and subplots=True a pie plot is drawn for each numerical column independently.

Syntax:

DataFrame.plot.pie(self, **kwargs)

Parameters:

Name Description Type/Default Value Required / Optional
y    Label or position of the column to plot. If not provided, subplots=True argument must be passed.  int or label Optional
**kwds Keyword arguments to pass on to DataFrame.plot().   Required

Returns: matplotlib.axes.Axes or np.ndarray of them
A NumPy array is returned when subplots is True.

Example:


Download the Pandas DataFrame Notebooks from here.

Previous: DataFrame.plot.line() function
Next: DataFrame.plot.scatter() function