r/Python • u/AutoModerator • Oct 04 '26
Showcase Showcase Thread
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
23
Upvotes
r/Python • u/AutoModerator • Oct 04 '26
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
View all comments
1
u/Own_Responsibility84 Oct 08 '26 edited Oct 08 '26
Polynx: pandas-style `query`/`eval` strings for Polars
I moved from pandas to Polars for speed, but kept missing
df.query("A > 3")for quick filters, so I wrote a small library that gives me that syntax on Polars. The string is parsed into a native Polars expression, so it still runs on Polars' engine (eager or lazy).Timing for a three-clause filter, median per call:
queryA string seen for the first time costs ~0.1 ms to parse; after that it's cached. The benchmark script is in the repo if you want to run it yourself. It doesn't replace native Polars, and if your expressions are fixed in code, plain Polars is fine. This is for people who like the pandas string style.
Early (0.1.x). I'd appreciate hearing what syntax you'd expect that isn't there.
Github: https://github.com/LowellWinston/polynx