Created
August 5, 2015 15:48
-
-
Save jasonamyers/1bb842812b3c3679a03a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sqlalchemy import and_, or_, not_ | |
| q = select([tblthing.c.id, tblthing.c.zip, tblthing.c.structure]) | |
| conditions = or_() | |
| for row in df.iterrows(): | |
| conditions.append(and_(tblthing.c.id=row['id'], tblthing.c.zip=row['zip'])) | |
| q = q.where(conditions) | |
| for row in connection.execute(q): | |
| print(row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment