plot.
pie
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.
matplotlib.pyplot.pie()
subplots=True
Label or position of the column to plot. If not provided, subplots=True argument must be passed.
Keyword arguments to pass on to Koalas.Series.plot().
Koalas.Series.plot()
A NumPy array is returned when subplots is True.
Examples
For Series:
>>> df = ks.DataFrame({'mass': [0.330, 4.87, 5.97], ... 'radius': [2439.7, 6051.8, 6378.1]}, ... index=['Mercury', 'Venus', 'Earth']) >>> plot = df.mass.plot.pie(subplots=True, figsize=(6, 3))
For DataFrame:
>>> plot = df.plot.pie(y='mass', figsize=(5, 5))