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.52
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.6-cp36-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15ea278e056df5a62201458d7bc363c77cec7596c7c70c3a39bfae135e0fcc79 |
|
MD5 | 77a97791ecce5aaaaea7f5ae3de0c6ba |
|
BLAKE2b-256 | d38c8f2bcf6a3a63bc018dac2415273cd5e67f545d422ecaaf2fb10cf8dcba1d |
Hashes for polars-0.8.6-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 221f606e0ac6ef85ea7fe2ed455372dcd7f8d779263dd26026e44fc7f07ce17f |
|
MD5 | 585bc8cf7396e53740ff71fb72aabc7e |
|
BLAKE2b-256 | 3fa20334468f76d5238d01f6db169355227b3c825639686454a2dfa0fd821082 |
Hashes for polars-0.8.6-cp36-abi3-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7743911157dd405fdce71893085f2fa9344bbb2e49b49428901736674421f98 |
|
MD5 | 3b52388f9555ba86e36e4d8aa70a2e32 |
|
BLAKE2b-256 | 14f8b8740ecac8eee7a81d92e4b35d34b326d87796209ff1c95c2b01de49252a |