Skip to content

Instantly share code, notes, and snippets.

@eightysteele
Created November 15, 2013 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eightysteele/7486258 to your computer and use it in GitHub Desktop.
Save eightysteele/7486258 to your computer and use it in GitHub Desktop.
def trimmer(rec):
keep_keys = ['class', 'country']
for key in rec.keys():
if key not in keep_keys:
rec.pop(key)
return rec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment