Last active
December 14, 2015 03:29
-
-
Save austinogilvie/5021628 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
| # joining meats + births on date | |
| q = """ | |
| SELECT | |
| m.date | |
| , b.births | |
| , m.beef | |
| FROM | |
| meat m | |
| INNER JOIN | |
| births b | |
| on m.date = b.date | |
| ORDER BY | |
| m.date | |
| LIMIT 100; | |
| """ | |
| joined = pysqldf(q) | |
| print joined.head() | |
| # date births beef | |
| # date | |
| # 1975-01-01 00:00:00 1975-01-01 00:00:00 0.009302 0.010676 | |
| # 1975-02-01 00:00:00 1975-02-01 00:00:00 0.008437 0.009353 | |
| # 1975-03-01 00:00:00 1975-03-01 00:00:00 0.009410 0.009586 | |
| # 1975-04-01 00:00:00 1975-04-01 00:00:00 0.008661 0.009607 | |
| # 1975-05-01 00:00:00 1975-05-01 00:00:00 0.008909 0.009373 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment