Registry / data / polars

polars

JSON →
library1.40.1pypypi✓ verified 51d ago

Polars is a blazingly fast DataFrame library implemented in Rust with a Python interface. Current version is 1.40.1. It follows a rapid release cadence with frequent minor and patch releases.

dataserialization
pip install polars
Install & Compatibility
Where this runs
tested against v1.41.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
7/13 runs
✓ 18.62s
py 3.11
7/13 runs
✓ 16.97s
py 3.12
7/13 runs
✓ 15.28s
py 3.13
7/13 runs
✓ 15.62s
py 3.9
✕ build_error
9/13 runs
483MB installed
● package 483MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

polars
import polars as pl
import polars
Convention is to import as 'pl' for brevity.
DataFrame
import polars as pl; pl.DataFrame
from polars import DataFrame
Use 'pl.DataFrame' to avoid name clashes and follow idiomatic usage.

Simple example creating a DataFrame and applying a filter.

import polars as pl df = pl.DataFrame({'name': ['Alice', 'Bob'], 'age': [30, 25]}) print(df.filter(pl.col('age') > 26))
Debug
Known issues
breakingStarting from Polars 1.0, default behavior may differ from previous major versions. Check migration guide.
fix
Review the 1.0 migration guide: https://pola-rs.github.io/polars/py-polars/html/reference/migration/1.0.html
affects: >=1.0.0
deprecatedThe 'retries' parameter in read functions is deprecated; use 'storage_options={"max_retries": n}' instead.
fix
Replace retries=n with storage_options={'max_retries': n} when reading from cloud storage.
affects: >=1.38.0
deprecatedSupport for the DataFrame interchange protocol is deprecated and will be removed in a future version.
fix
Use Polars' own interoperability functions (e.g., to_arrow, from_arrow) instead.
affects: >=1.40.0
gotchaPolars is lazy by default; operations build a query plan until collect() is called. Forgetting to call collect() returns a LazyFrame, not a DataFrame.
fix
Always call .collect() on LazyFrame to execute and get a DataFrame.
affects: all
Errors
Common errors & fixes
TypeError: 'Expr' object is not callable
Using pl.col('name') as a function call instead of an expression.
fix
Use pl.col('name') as an expression, e.g., df.select(pl.col('name')). Do not add parentheses after it.
AttributeError: module 'polars' has no attribute 'DataFrame'
Installed polars-lts-cpu or polars-u64-id instead of the main polars package, or wrong import path.
fix
Install the correct package: pip install polars. Verify import with 'import polars as pl; print(pl.__version__)'.
ComputeError: could not include module ...
Using a deprecated or removed function due to version mismatch.
fix
Check Polars release notes for removed functions and update your code accordingly. Use stable APIs like pl.col() or pl.lit().
PanicException: called `Result::unwrap()` on an `Err` value
Internal error in Rust backend, often due to unsupported data types or operations.
fix
Ensure data types are compatible. If persists, report a bug with a minimal reproducible example on GitHub.
Upgrade
Version history
1.41.2latest on PyPI
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
10
seranking-bot
4
ahrefsbot
2
Meta
1
Amazon
1
Resources