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.5-cp36-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0717f24be0664136fe72ab6cc601b4b3790c5ced214310ae75ca1ad2db661566 |
|
MD5 | 1602201b269f50f2172820e161005c6c |
|
BLAKE2b-256 | 8bffe23edbf7e5bd8d472315cc8f2cf88039bd1282035b8dabcc9272f9ef343d |
Hashes for polars-0.8.5-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e9f70f7c45dadc3d1f0646608b1ab4ea3e2c4608a1a1da2717470f4c27196fc |
|
MD5 | 4f308aebe6cc7703eb3bed74c2b9e378 |
|
BLAKE2b-256 | 56ea5cb27c1622b154bfbf20e7020b71d03ca5b8e8248d4d8c27a3fc8becac01 |
Hashes for polars-0.8.5-cp36-abi3-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 396890384b4a6de164e8288eae79f229e6c72f551f51f047e47344240661acc5 |
|
MD5 | bcfc3b2ba5e3cf41c35819ec056f1363 |
|
BLAKE2b-256 | 35c19a340c5b1e8de5824d0c35c697cea723145f6d22f6d1c7b1c3af9e80df09 |