plot.
pie
Generate a pie plot.
A pie plot is a proportional representation of the numerical data in a column. This function wraps plotly.express.pie() for the specified column.
plotly.express.pie()
Label or position of the column to plot. If not provided, subplots=True argument must be passed (matplotlib-only).
subplots=True
Keyword arguments to pass on to pandas-on-Spark.Series.plot().
pandas-on-Spark.Series.plot()
plotly.graph_objs.Figure
Return an custom object when backend!=plotly. Return an ndarray when subplots=True (matplotlib-only).
backend!=plotly
Examples
For Series:
>>> df = ps.DataFrame({'mass': [0.330, 4.87, 5.97], ... 'radius': [2439.7, 6051.8, 6378.1]}, ... index=['Mercury', 'Venus', 'Earth']) >>> df.mass.plot.pie()
For DataFrame:
>>> df = ps.DataFrame({'mass': [0.330, 4.87, 5.97], ... 'radius': [2439.7, 6051.8, 6378.1]}, ... index=['Mercury', 'Venus', 'Earth']) >>> df.plot.pie(y='mass')