3 ms·
Hm, you're currently able to do this through Pandas. stuff: list[mydataclass] stuff_df = pd.DataFrame(stuff) results = sql^ "SELECT * FROM stuff_d
by ekzhang 4y ago
Hm, you're currently able to do this through Pandas.
stuff: list[mydataclass]
stuff_df = pd.DataFrame(stuff)
results = sql^ "SELECT * FROM stuff_df WHERE field = 2"
My guess is that this would be a lot faster than dataclasses-sql due to less conversion overhead, but we'd have to benchmark it to be sure.
- pizza 4y agoAh interesting. I was thinking along the lines of if you wanted to, say, package up an algorithm as a class, make a ton of these classes/algorithms, and then affix them in a bunch of ways. E.g. "find the algorithms that take in data and spit out predictions, compose them with the algorithms that have a prediction_input field" etc.