Skip to content

Instantly share code, notes, and snippets.

@stestagg
Created March 28, 2018 13:51
Show Gist options
  • Save stestagg/4480b2879226b116cec8483c0dc470b8 to your computer and use it in GitHub Desktop.
Save stestagg/4480b2879226b116cec8483c0dc470b8 to your computer and use it in GitHub Desktop.
one_grams_tube = (tubes.Each(FILES)
.read_files()
.split()
.tsv(headers=False)
.skip_unless(lambda row: row.get(1).to(int).gt(1799))
.multi(lambda row: (
row.get(0).equals(word.encode('utf-8')),
row.get(1).to(int),
row.get(2).to(int)
))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment