You can use .size() to get the count for each group. You'll need to group by Department and Gender simultaneously to obtain the individual counts of all the subgroups.
Here is some example code:
from matplotlib import pyplot as plt import pandas as pd import numpy as np N = 100 Employee = pd.DataFrame({'Gender': np.random.choice(['Male', 'Female'], N), 'Department': np.random.choice(['IT', 'Sales', 'HR', 'Finance'], N), 'Age': np.random.randint(20, 65, N), 'Salary': np.random.randint(20, 100, N) * 1000}) colors = ["turquoise", "tomato"] group_by_departments_and_gender = Employee.groupby(["Department", "Gender"]).size().reset_index(name='Counts') sizes = group_by_departments_and_gender['Counts'] labels = [f'{dept}\n {gender}' for dept, gender in group_by_departments_and_gender[['Department', 'Gender']].values] plt.pie(sizes, labels=labels, colors=colors, autopct='%.2f %%') plt.tight_layout() plt.show()

PS: You could assign a color per gender via:
colors = ["magenta" if gender=="Male" else "deepskyblue" for gender in group_by_departments_and_gender["Gender"]]
This especially helps in case one of the genders wouldn't be present in one of the departments.
Employeewould help. What do you mean "it is coming out incomplete"?