Skip to content

Instantly share code, notes, and snippets.

@cpcloud
Created March 26, 2015 17:00
Show Gist options
  • Save cpcloud/2f1fc28afe609ad15c14 to your computer and use it in GitHub Desktop.
Save cpcloud/2f1fc28afe609ad15c14 to your computer and use it in GitHub Desktop.
blaze isin
# currently:
diamonds[(diamonds.cut == 'Ideal') | (diamonds.cut == 'Premium')][['cut', 'price']].sort('price', ascending=False).head(10)
# ideally:
diamonds[diamonds.cut.isin(['Ideal', 'Premium'])][['cut', 'price']].sort('price', ascending=False).head(10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment