December 2018
Beginner to intermediate
682 pages
18h 1m
English
>>> college = pd.read_csv('data/college.csv')>>> subset = ['UGDS', 'SATMTMID', 'SATVRMID']>>> college2 = college.dropna(subset=subset)>>> college.shape(7535, 27)>>> college2.shape(1184, 27)
>>> def weighted_math_average(df): weighted_math = df['UGDS'] * df['SATMTMID'] return int(weighted_math.sum() / df['UGDS'].sum()) ...