Skip to content

Instantly share code, notes, and snippets.

@phobson
Created October 16, 2014 22:20
Show Gist options
  • Save phobson/794c4e7b1399448645e6 to your computer and use it in GitHub Desktop.
Save phobson/794c4e7b1399448645e6 to your computer and use it in GitHub Desktop.
pandas chaining
(
flights.groupby(['year', 'month', 'day'])
[['arr_delay', 'dep_delay']]
.mean()
.query('arr_delay > 30 | dep_delay > 30')
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment