As an analyst, I often am faced with a choice between
- write a giant unmaintainable SQL query, or
- pull everything to my PC and use pandas, to take advantage of its ability to build up results piece by piece.
I wrote this library to try and enable that piece-by-piece development approach with SQL queries, without resorting to the mental overhead of full on query builders like SQLAlchemy or Linq.
Seeking feedback - is this useful for you? is it at the right level of abstraction?
Interesting approach! I've been working on it from the other angle: having pandas code generate SQL. If you're interested in checking it out, happy to try and show how it would generate the query in your readme!
https://github.com/machow/siuba
One thing I was wondering about the gnarly ast stuff you mention, what about operator overloading? E.g. Q("Select a from" + subquery + "where a < 1")