Polars

Polars

@pola.rs

Dataframes powered by a multithreaded, vectorized query engine, written in Rust.

1K followers3 following96 posts

Polars 2.1 is released! Three weeks after 2.0 we're shipping a big one. A few highlights: - Spill to disk for group-by and window functions - Recursive CTE's in SQL - Reading and writing encrypted Parquet - Better memory tracking for out-of-core - And over 90 performance improvements merged 🧵

Polars 2.0.0rc2 has been released. We expect this to be the last release candidate and that Polars 2.0 will go live next week. Install now by running `pip install --pre polars` Link to the full release guide: docs.pola.rs/releases/upg...

We are happy to announce the first pre-release of Polars 2.0. Polars 2.0 will bring the streaming engine as a default and improves overall strictness of Polars. Give it a spin and share your thoughts. We expect the final Polars 2.0 release in 3-4 weeks. pola.rs/posts/announ...

The Polars GPU engine now runs on a new streaming backend, built with NVIDIA on their RapidsMPF library. • Queries are no longer bound by GPU memory. • The same query scales from one GPU to many. Full post: pola.rs/posts/gpu-st...

As datasets grow, your tools can limit what analysis is possible. That causes teams to slows down or forces them to work with samples rather than the whole dataset. BMLL Technologies tackled this issue by migrating their workloads, resulting in a 48x performance improvement. pola.rs/posts/case-b...

You can turn a column into labeled buckets. With if/elif/else logic takes one chained expression: pl.when().then().otherwise(). Conditions are checked top to bottom, exactly like Python's if/elif/else. Chain as many as you need, and every branch runs vectorized in Rust rather than row by row.

Time series datasets are seldom perfect. Polars gives you a whole menu for repairing them, and the right pick depends on what you need.

We've released Polars Cloud client 0.10.0: • Stream query results into Python with `sink_batches()` • A new experimental query planner: Miso • Distributed `pl.collect_all()` • Hive-partition aware scans • On-Prem HDFS support Blog post: pola.rs/posts/polars... Changelog: github.com/pola-rs/pola...

pola.rsAnnouncing Polars Cloud 0.10.0Polars Cloud 0.10.0 streams distributed query results into Python with sink_batches(), adds an experimental miso query planner, distributed pl.collect_all(), experimental HDFS support, optimized hive-...

A float column can hold two different kinds of missing: null for a value that is absent, and NaN for arithmetic that had no valid answer (think 0.0/0.0). Polars keeps them strictly separate.

Reading a terabyte dataset from S3 goes fastest on a cluster of small machines, while heavy joins run fastest on one big machine. We benchmarked single node Polars against distributed Polars on the same total resources, and the bottleneck of your query decides the winner. pola.rs/posts/single...

How well do LLMs migrate pandas to Polars by themselves? We tested how well Claude translates a pandas corpus to Polars. Results were promising but not perfect. To improve this, we built a Polars skill that helps the agent. Read the full post here: pola.rs/posts/llm-po...

Distributed Polars is 3x faster than Spark on the PDSH benchmark and up to 7.8x faster on individual queries. Read the full benchmark post here: https:/pola.rs/posts/polars-pyspark-benchmarks/

Run Polars' distributed engine on your own infrastructure. Deploy a distributed Polars cluster on any Kubernetes setup (EKS, AKS, GKE, or minikube) and get a query dashboard with past queries, advanced query profiling, Open-lineage support, and more. More at pola.rs/posts/polars...

Polars supports a full Iceberg roundtrip on the streaming engine. You can scan an Iceberg table with scan_iceberg(), transform it lazily, and write the result back with sink_iceberg(). Useful for workflows like data redaction or compliance cleanup.

We've released Python Polars 1.40. The following now runs on the streaming engine • AsOf joins with a `by` argument • Basic elementwise over() • More expressions: cov(), corr(), interpolate(), skew(), kurtosis(), and entropy() and much more! github.com/pola-rs/pola...

github.comRelease Python Polars 1.40.0 · pola-rs/polars🏆 Highlights Add streaming support for grouped AsOf join (#27293) ⚠️ Deprecations Deprecate support for dataframe interchange protocol (#27214) 🚀 Performance improvements Create IR slice from ...

Realtime query profiling of Polars In this post we use the query profiler in Polars Cloud to optimize the infrastructure configuration for a specific query. This results in a 54% faster and 64% cheaper query with only five runs. Read all about it here: pola.rs/posts/query-...

We've released Polars Cloud client 0.6.0. Some of the highlights: • Improved UX for query profiling • Compute Scratchpad Alpha • Improved distributed query planning • Breaking: `LazyFrameRemote.execute` is now blocking by default

We've released Python Polars 1.39. Some of the highlights: • Streaming AsOf join, enabling memory-efficient time-series joins. • sink_iceberg() for writing to Iceberg tables • Streaming cloud downloads for scan_csv(), scan_ndjson(), and scan_lines() github.com/pola-rs/pola...

github.comRelease Python Polars 1.39.0 · pola-rs/polars🚀 Performance improvements Lower arg_{min,max} to streaming engine (#26845) Additional IR slice pushdown after filter pushdown (#26815) Streaming first/last on Enum through physical (#26783) Fast ...

pl.from_repr() constructs a DataFrame or Series directly from its printed string representation. This can be useful in unit tests: instead of rebuilding expected DataFrames through dictionaries with typecasting, the schema is encoded in the header and the values are right there in the table.

str.len_bytes() vs str.len_chars() len_bytes: ~20x faster, counts UTF-8 bytes len_chars: counts actual Unicode characters - Use len_bytes for ASCII data (IDs, hashes) - Use len_chars for anything multilingual len_bytes is O(1) metadata lookup, len_chars is O(n) traversal.

We've released Python Polars 1.38. Some of the highlights: • (De)Compression support on text based sources and sinks • scan_lines() to read text files • Merge join in the Streaming engine Link to the complete changelog: github.com/pola-rs/pola...

github.comRelease Python Polars 1.38.0 · pola-rs/polars⚠️ Deprecations Deprecate retries=n in favor of storage_options={"max_retries": n} (#26155) 🚀 Performance improvements Enable zero-copy object_store put upload for IPC sink (#26288) Resolve file...

We refactored the Categorical in 1.31. The new Categories object gives you: • Control over the physical type (UInt8/16/32) • Named categories with namespaces • Parallel updates without locks • Automatic garbage collection Full read: pola.rs/posts/catego...

Polars reposted

In 1-2 weeks we land live query profiling in Polars Cloud. See exactly how many rows are consumed and produced per operation. Which operation takes most runtime, and watch the data flow through live, like water. 😍

We just released Polars 1.37, here are the highlights: Improved Streaming Sinks: 1.14x-1.88x speedup, ~10% of the original memory. Streaming Compressed CSVs Faster SQL Ordering pl.PartitionBy min_by / max_by (see below) Series.sql() Free-Threading Support Python 3.9 Support Dropped musl Builds

Did you know about pl.corr()? The problem with data aggregation is that it can hide what's really going on. Below you can find Simpson's Paradox Sometimes the devil really is in the details.

"We adopted Polars to meet strict technical requirements, but the result went beyond simple optimization. The 30x performance improvement gave us the unexpected opportunity to do more." Read about how Rabobank deployed Polars in a critical enterprise production environment: lnkd.in/eZFPcxRw

Polars recently shipped some performance upgrades and long-awaited features: 🏆 Decimal Type Now Stable 🏆 Aggregation over the List and Array Types ✨Other new features: Streaming ewm_mean() Expr.item() Expr.rolling_rank() pl.union() Read more: github.com/pola-rs/pola...