5 ms·
Is anyone working on a translator for pandas dataframe syntax to SQL?
by starpilot 7y ago
Is anyone working on a translator for pandas dataframe syntax to SQL?
- alexhutcheson 7y agoIn the R world, dbplyr[1] does this amazingly well. [1] https://dbplyr.tidyverse.org/ https://dbplyr.tidyverse.org/
- airstrike 7y agotidyverse is just an mind-boggingly amazing ecosystem of packages Forget Da Vinci, the first man to be cloned should be Hadley Wickham
- medecau 7y ago[Blaze](https://blaze.readthedocs.io/en/latest/what-blaze-isnt.html#what-blaze-does https://blaze.readthedocs.io/en/latest/what-blaze-isnt.html#...)
- faizshah 7y agoIbis: https://docs.ibis-project.org/ https://docs.ibis-project.org/ https://docs.ibis-project.org/notebooks/tutorial/2-Basics-Aggregate-Filter-Limit.html https://docs.ibis-project.org/notebooks/tutorial/2-Basics-Ag...
- starpilot 7y agoDang, Ibis doesn't support Redshift or SQL Server. I'm also having trouble understanding what it really is - it's an entire framework for big data it seems and not just a translator. What I'd really like is just that, something that turns pandas dataframe operation into ANSI SQL. So input pandas2sql('tablename["col"]') -> "select col from tablename". Something really simple to use.
- goatinaboat 7y agoPandas has from_sql and to_sql methods that are compatible with SQLAlchemy if you insist on using an ORM, that gets you most of the way there...
- philipov 7y agoSQLAlchemy is more than just an ORM. It also has sql expression language, for writing queries using python without using any ORM features.
- shrikant 7y agoThere's also this: https://pypi.org/project/pandasql/ https://pypi.org/project/pandasql/