No project description provided
Project description
Polars
Blazingly fast DataFrames in Rust & Python
Polars is a blazingly fast DataFrames library implemented in Rust using Apache Arrow as memory model.
- Lazy | eager execution
- Multi-threaded
- SIMD
- Query optimization
- Powerful expression API
- Rust | Python | ...
To learn more, read the User Guide.
Rust setup
You can take latest release from crates.io
, or if you want to use the latest features/ performance improvements
point to the master
branch of this repo.
polars = {git = "https://github.com/ritchie46/polars", rev = "<optional git tag>" }
Rust version
Required Rust version >=1.51
Python users read this!
Polars is currently transitioning from py-polars
to polars
. Some docs may still refer the old name.
Install the latest polars version with:
$ pip3 install polars
Documentation
Want to know about all the features Polars support? Read the docs!
Rust
Python
- installation guide:
$ pip3 install polars
- User Guide
- Reference guide
Performance
Polars is written to be performant, and it is! But don't take my word for it, take a look at the results in h2oai's db-benchmark.
Cargo Features
Additional cargo features:
temporal (default)
- Conversions between Chrono and Polars for temporal data
simd (nightly)
- SIMD operations
parquet
- Read Apache Parquet format
json
- Json serialization
ipc
- Arrow's IPC format serialization
random
- Generate array's with randomly sampled values
ndarray
- Convert from
DataFrame
tondarray
- Convert from
lazy
- Lazy api
strings
- String utilities for
Utf8Chunked
- String utilities for
object
- Support for generic ChunkedArray's called
ObjectChunked<T>
(generic overT
). These will downcastable from Series through the Any trait.
- Support for generic ChunkedArray's called
[plain_fmt | pretty_fmt]
(mutually exclusive)- one of them should be chosen to fmt DataFrames.
pretty_fmt
can deal with overflowing cells and looks nicer but has more dependencies.plain_fmt (default)
is plain formatting.
- one of them should be chosen to fmt DataFrames.
Contribution
Want to contribute? Read our contribution guideline.
[Python] compile py-polars from source
If you want a bleeding edge release or maximal performance you should compile py-polars from source.
This can be done by going through the following steps in sequence:
- install the latest rust compiler
$ pip3 install maturin
- Choose any of:
- Very long compile times, fastest binary:
$ cd py-polars && maturin develop --rustc-extra-args="-C target-cpu=native" --release
- Shorter compile times, fast binary:
$ cd py-polars && maturin develop --rustc-extra-args="-C codegen-units=16 -C lto=thin -C target-cpu=native" --release
Note that the Rust crate implementing the Python bindings is called py-polars
to distinguish from the wrapped
Rust crate polars
itself. However, both the Python package and the Python module are named polars
, so you
can pip install polars
and import polars
(previously, these were called py-polars
and pypolars
).
Acknowledgements
Development of Polars is proudly powered by
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for polars-0.8.4-cp36-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff282fa3478e9d529ae4b110f3592729fd8fdc825000cdd90d75699251a9c1f0 |
|
MD5 | 9ce6750ddcb962de0856a3efe8a43bf0 |
|
BLAKE2b-256 | f9a41eac8364a45d4707efe071c5b22c3a0669fb77699cc45c9c0e91fc7743a5 |
Hashes for polars-0.8.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ac964cd98601a97a84c5bced385a168b0707a1899b90da3786b8f54ee898f16 |
|
MD5 | 7599cbfd1bf81ac3c06b69964f8e5406 |
|
BLAKE2b-256 | 42ee5fb4d9f722dfd72c3bfb59bc3beedc6bbd2b8c7fb6a17f6d81f0ca3c8dc9 |
Hashes for polars-0.8.4-cp36-abi3-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86338646dd3813262d96ffb62a5a22ad73e68c2eabff8f465559f170ea84f07e |
|
MD5 | a44498e6751845c802c9cfa05898010d |
|
BLAKE2b-256 | 998d57a06a61c537112e1ffea8f2db56270edeede7e43fae9c661334609c9c9d |