Pie is a type of graph in which a circle is divided into different sectors and each sector represents a part of the whole. A pie plot is used to represent numerical data proportionally. To plot a pie chart, either column label y or 'subplots=True' should be set while using df.plot(kind='pie') . If no column reference is passed and subplots=True, a 'pie' plot is drawn for each numerical column independently.
In the Program we have a DataFrame with information about the planet's mass and radius. The ‘mass’ column is passed to the plot() function to get a pie plot as shown in Figure.
Program :
import pandas as pd
import matplotlib.pyplot as plt
df = pd.DataFrame({'mass': [0.330, 4.87 , 5.97],
'radius': [2439.7, 6051.8, 6378.1]},
index=['Mercury', 'Venus', 'Earth'])
df.plot(kind='pie',y='mass')
plt.show()
Pie chart as output of Program

It is important to note that the default label names are the index value of the DataFrame. The labels as shown in Figure are the names of the planet which are the index values as shown in Program.