Pandasql: Make python speak SQL
blog.yhat.com
blog.yhat.com
The following limitations do exist: no support for non-numeric expressions, no support for outer joins with inequality conditions...and many, many more, SQL is crazy complex. The topics listed explicitly, however, are on the agenda to be fixed.
As an aside, framequey is a mere month old and developed in my spare time, the limitations you cited reflect my current priorities and are, as written, planned to be fixed.
conn = sqlite3.connect(':memory:')
For example, an SPOJ context judge. https://github.com/pauldraper/spoj-judge/blob/master/judge.p...Well, now I don't feel so hackish.
The docstring for `sqldf` says "This function is meant for backward compatibility only. New users are encouraged to use the PandaSQL class". So I'm not sure why they'd advocate its use, especially if you're going to create a wrapper function anyway.
my_df = pd.DataFrame(...)
queried_df = pysqldf("select * from my_df where col = 1")
Looks useful :)EDIT: Actually, looking at the code, it loads your dataframes into SQLite memory tables and uses to_sql and from_sql under the hood to query from there.