Skip to content

Instantly share code, notes, and snippets.

@hernamesbarbara
Created January 11, 2013 16:53
Show Gist options
  • Save hernamesbarbara/4512226 to your computer and use it in GitHub Desktop.
Save hernamesbarbara/4512226 to your computer and use it in GitHub Desktop.
selecting data in pandas
import numpy as np
import pandas as pd
# look at free reports
free = df[df.report_name.isin(free)]
# look at paid reports only
paid = df[df.report_name.apply(lambda x: x not in free)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment