Top
Best
New

Posted by simicd 11 hours ago

Polars 2.0(pola.rs)
394 points | 94 commentspage 3
jt-s 7 hours ago|
Although I find pandas a bit aggravating in many ways, for myself and my equally idiotic laboratory scientist pals, seems that it is the default way you might interface with other libraries like SciPy (i.e. they expect things as NumPy arrays or pandas dataframes). Is this a real issue or will most things happily accept a polars dataframe? We don’t work with such large datasets that speed is likely a huge concern tbh.
0cf8612b2e1e 5 hours ago||
One nice development in this space is the narwhals library - it is a dataframe agnostic library. It allows you to seamlessly switch between pandas, polars, modlin, or any of the variations coming out.

Narwhal is still fairly new, but I expect its usage to spread since most packages only require rudimentary dataframe manipulation (set a value, math been these two columns, etc) where the limited api surface is not a problem.

Narwhals is also a much cheaper dependency to add than polars/pandas/etc so it is a somewhat easy sell to incorporate.

niksmather 6 hours ago||
You can convert to numpy using .to_numpy().

It's also got much better support for more complex array shapes (e.g. each row storing an array). At least it did last time I used pandas!

tonyhart7 10 hours ago||
finally long time coming

cant wait to upgrade my Quant trading bot

geodel 5 hours ago||
Not to take away any prop knowledge from you but I've been playing with some very very early ideas of getting some market data, save in duckdb do some analysis, create some kind of portfolio and buy/sell via API and nowhere close implementation. Yours seems rather established platform. Would you be able to share kind of high level architecture of bot?
tonyhart7 4 hours ago||
use a higher timeframe to understand the market phase, and a lower timeframe for entries.

when I started, I tried mimicking a human trader. if you want to expand into full quant, be aware of overengineering (past mistake of mine).

you can copy or mimic institutional desk strategies. most of the concepts are fine, but the devil is in the details.

sometimes you open too early or too late. finding that sweet spot, where you don’t want a lot of drawdown, requires a lot of fine-tuning.

m00dy 9 hours ago||
I'm also using it for BlockRotate, it's time to upgrade.
tonyhart7 6 hours ago||
I mainly trade xauusd and fx

more predictable

nzgrover 1 hour ago||
Spelling error in first paragraph. enthousiastic
mrtimo 8 hours ago|
I can use pandas to clean a dataset, but each cleaning task is usually one line of code. OTOH, With DuckDB with one SQL statement I can replace 40+ lines of polars/pandas. You may reply, SQL isn't as easy to understand! Fair point, it's a declarative language... which is why I use Malloy. Malloy is to TypeScript as Javascript is to SQL. Malloy is much easier to read and write (just as TypeScript is) because it has a built in semantic model -- all the joins, measures, and dimensions are done in one place.

Here is an example [1] of visualizing college football games. Here are all the queries, and semantic model that power all the visualizations [2] Here is the AI generated typescript/react that does the visualizations [3]. The Malloy ecosystem has Malloyyo and Publisher which are replacements for PowerBI and Tableau and Looker. Here is another example for visualizing global trade [4].

[1] - https://mrtimo.github.io/cfb-games/games-2026.html?week=Week... [2] - https://github.com/mrtimo/cfb-games/blob/main/drives.malloy [3] - https://github.com/mrtimo/cfb-games/blob/main/dashboards/gam... [4] - https://tradeexplorer.org/

entropicdrifter 3 hours ago|
The linked announcement includes the facts that Polars now supports SQL and the new version scales better than DuckDB