text_html_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

titanic = pd.read_csv('/kaggle/input/test-file/tested.csv')

titanic.shape

titanic_gender = titanic['Sex'].value_counts(normalize=True)

wp = {'linewidth': 1, 'edgecolor': 'black'}
plt.pie(titanic_gender, labels=['Female', 'Male'], colors=['pink', 'yellow'], autopct='%0.1f%%', explode=[0, 0.05], wedgeprops=wp)
plt.title('Pie chart for gender in titanic')
plt.legend(loc='upper right')
plt.axis('equal')
plt.tight_layout()