image_output_1.png
import pandas as pd

df = pd.read_csv('/kaggle/input/students-performance-in-exams/StudentsPerformance.csv')

df.count()

total_count = len(df)
total_count

men_count = len(df[df['gender'] == 'male'])
female_count = len(df[df['gender'] == 'female'])

proportion_men = men_count / total_count
proportion_female = female_count / total_count
print('proportion_men:', proportion_men)
print('proportion_female:', proportion_female)