Skip to content

Instantly share code, notes, and snippets.

@itsmemattchung
Created March 12, 2015 06:39
Show Gist options
  • Save itsmemattchung/36e998c2207fc0a5434e to your computer and use it in GitHub Desktop.
Save itsmemattchung/36e998c2207fc0a5434e to your computer and use it in GitHub Desktop.
27
28 mpg_combined_average = data_set.ix[
29 (data_set['DRIVE_DESCR'] == 'All Wheel Drive') &
30 (data_set['VOLUME'] > 3) &
31 (data_set['GEARS'] % 2 == 0)].MPG_COMBINED.mean()
32
33 print "MPG Combined is {mpg}".format(mpg=mpg_combined_average)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment