Skip to content

Instantly share code, notes, and snippets.

@clintmjohnson
Created May 30, 2015 04:05
Show Gist options
  • Select an option

  • Save clintmjohnson/b659bf663c98387a8f7b to your computer and use it in GitHub Desktop.

Select an option

Save clintmjohnson/b659bf663c98387a8f7b to your computer and use it in GitHub Desktop.
Python Blaze Example List Computation
from blaze import *
accounts = Symbol('accounts', 'var * {id: int, name: string, amount: int}')
deadbeats = accounts[accounts.amount < 100].name
L = [[1, 'Alice', 100],
[2, 'Bob', -200],
[3, 'Charlie', 300],
[4, 'Denis', 400],
[5, 'Edith', -500]]
print(list(compute(deadbeats, L)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment