text_plain_output_1.png
import pandas as pd

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

df.count()

std_ms_all = df['math score'].std()
std_ms_men = df[df['gender'] == 'male']['math score'].std()
std_ms_female = df[df['gender'] == 'female']['math score'].std()
print('std_ms_all:', std_ms_all)
print('std_ms_men:', std_ms_men)
print('std_ms_female:', std_ms_female)