Python support for Parquet file format
Project description
fastparquet is a python implementation of the parquet format, aiming integrate into python-based big data work-flows. It is used implicitly by the projects Dask, Pandas and intake-parquet.
We offer a high degree of support for the features of the parquet format, and very competitive performance, in a small install size and codebase.
Details of this project, how to use it and comparisons to other work can be found in the documentation.
Requirements
(all development is against recent versions in the default anaconda channels and/or conda-forge)
Required:
numpy
pandas
cython (if building from pyx files)
cramjam
fsspec
Supported compression algorithms:
Available by default:
gzip
snappy
brotli
lz4
zstandard
Optionally supported
Installation
Install using conda, to get the latest compiled version:
conda install -c conda-forge fastparquet
or install from PyPI:
pip install fastparquet
You may wish to install numpy first, to help pip’s resolver. This may install an appropriate wheel, or compile from source. For the latter, you will need a suitable C compiler toolchain on your system.
You can also install latest version from github:
pip install git+https://github.com/dask/fastparquet
in which case you should also have cython to be able to rebuild the C files.
Usage
Please refer to the documentation.
Reading
from fastparquet import ParquetFile
pf = ParquetFile('myfile.parq')
df = pf.to_pandas()
df2 = pf.to_pandas(['col1', 'col2'], categories=['col1'])
You may specify which columns to load, which of those to keep as categoricals (if the data uses dictionary encoding). The file-path can be a single file, a metadata file pointing to other data files, or a directory (tree) containing data files. The latter is what is typically output by hive/spark.
Writing
from fastparquet import write
write('outfile.parq', df)
write('outfile2.parq', df, row_group_offsets=[0, 10000, 20000],
compression='GZIP', file_scheme='hive')
The default is to produce a single output file with a single row-group (i.e., logical segment) and no compression. At the moment, only simple data-types and plain encoding are supported, so expect performance to be similar to numpy.savez.
History
This project forked in October 2016 from parquet-python, which was not designed for vectorised loading of big data or parallel access.
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 Distribution
Built Distributions
Hashes for fastparquet-0.7.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7fbf2118497446f0fe5e90503e12b82f38c45a241cdfc8ea8a1e877c2072d09 |
|
MD5 | d8bc9aa46ac05858da701cfbb092ca45 |
|
BLAKE2b-256 | a12edcce7c9dfe0f30eb45cdc90376ab9ea0d860f6c8135d85315624c1d44c8c |
Hashes for fastparquet-0.7.2-cp39-cp39-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8b98ee1a9940eeb8556adea0f57d1318b4982ba8fb5db0874759b8d649e1e26 |
|
MD5 | 6509a34c560a3d2c7eee196e936c3af1 |
|
BLAKE2b-256 | 4ebffc9d39d5af9107ca864ad1f48de0f4f65e0b5b6636cb94e63e8a0258dfee |
Hashes for fastparquet-0.7.2-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b32d3ce4db8e659c5c1937eb209acb41bd9842029e522962158a617eea36f74b |
|
MD5 | fb64f9e7f11fe6eecb1da9d8bf164dc2 |
|
BLAKE2b-256 | 5e30b4f4bee179fddc475c4f14e89b84b53ec6b7c6459cf946621aaa8e31c5f3 |
Hashes for fastparquet-0.7.2-cp39-cp39-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96f90697b342e889f1abce756f7b06fd1f1c8e8f9965f2f7ea156ffb2d8cf245 |
|
MD5 | 1b8a3ee8f01d6aac89ad3a7bc6adbc5d |
|
BLAKE2b-256 | 832e757ed7b0b7fd3cd0517ec09a49e03520b1aa6ed6c555635a6956c60f5658 |
Hashes for fastparquet-0.7.2-cp39-cp39-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5addb4118b394e0d7c92d238cafcd43e320c7a8fc9ec3170acf3fac80a463f5f |
|
MD5 | c25410bc94d858d219869302f29ba573 |
|
BLAKE2b-256 | f1fb892947da1c3c567eaa5ea1736858163cf1292a403351c322efb11cf156c5 |
Hashes for fastparquet-0.7.2-cp39-cp39-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 752c7d54320c1001881ba4cb623be10e812e881902ed5e25efea86fcd9175bce |
|
MD5 | 88445cf407098e8049a80ff2fd9b484c |
|
BLAKE2b-256 | a4c8df2498e6cc24ab1b1702c36e654ec7406fe68a4562863c1d8faa802ebada |
Hashes for fastparquet-0.7.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 086366f97bf93f3765d7cfbcab8f846328c6a3db63021c165d5fbc3a4e25c840 |
|
MD5 | 8d3b48222eacdd74663eadf9acf02f54 |
|
BLAKE2b-256 | 414bce4928f022b9f121adf5fad39434d736948cff8739b6e8c7dc4b3d8a0aca |
Hashes for fastparquet-0.7.2-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f262aacc45d5895833ec0ed46dde29d11efb23fd05b2a3f57cd610b29846de9 |
|
MD5 | 55671b4a0b4e7a746171046ecd26c68f |
|
BLAKE2b-256 | dc313cf4af8990031e4066bcbd499ac583fa82c2fa3e2b3bad7d07d62b308c88 |
Hashes for fastparquet-0.7.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0cc3318ee8029221cb05c297b9f554997b24584d28b621ea83733cb5be109c5 |
|
MD5 | 7872452640a8593f6fd727c56bf5cbda |
|
BLAKE2b-256 | a8c55cbf17fdb0ddf11ed02c07f2f1bf1266f18b26be9b8e729300782d4a6bb1 |
Hashes for fastparquet-0.7.2-cp38-cp38-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d4b6ae6ee415f67e1f538f77662d149a3ab307a2788bcafdfb6a3710c231b78 |
|
MD5 | 8e846995d1b45ab907cf6c1986283b70 |
|
BLAKE2b-256 | deff603ae6d4d27bdae930c84075131e1bc9a1d2a14e0cb4af056829e42e336b |
Hashes for fastparquet-0.7.2-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64eac8d038902f5a9854e957abb360c802f600c3500f053011c185fe4c0aa1c5 |
|
MD5 | 6e2806ae13e44fffbb53310cedad2847 |
|
BLAKE2b-256 | d62eaf54499e0c7a010980593857f8aa4069d1648d4a8c3c818c0aa275c460f1 |
Hashes for fastparquet-0.7.2-cp38-cp38-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1435c52f0b4bd8799bffde9dbfe34159d7b0743729efb75e4f52f4b550129ed8 |
|
MD5 | e098c1331a702a8a5e81e9004607f27b |
|
BLAKE2b-256 | 11a90f44c2b49fba4f07323e035c5dfa94b75e65a2461b0605c2f925c0b1d1b3 |
Hashes for fastparquet-0.7.2-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec4988eee14c896043197ac5e7188f195b365e1405842fc003e55c4b19742167 |
|
MD5 | 852886ee959fdb3433ec1622467ce55c |
|
BLAKE2b-256 | 4f1826635c6250bc45759397651eae8ea1954cd2ce7839c266224c5eb75eadc4 |
Hashes for fastparquet-0.7.2-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c330210a79d7b4756394e239a38f9c1aab682057063517c774f1daf8b28485b8 |
|
MD5 | fdfdb354186e3c934b3be1dbaf9acdb6 |
|
BLAKE2b-256 | edc8a2baf8760b86f13bbc30efab60462c639143e88d87a7569b1d23743b7863 |
Hashes for fastparquet-0.7.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa4de9731b6f14c9f8c53ba8b197ce11835972108992918d3ef9d621e881ce46 |
|
MD5 | f116caa30f8741249a687de83e240ad3 |
|
BLAKE2b-256 | 5078f2aec339308116e5d6a9a028178930d8d812dccde2331a97a0540b01c553 |
Hashes for fastparquet-0.7.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c02edf5394e8e01b582a2aebdb1a7e341d0bc71bbe9972bae38eddd25a802e78 |
|
MD5 | 4d73338449c666ee96770aa06533d6bc |
|
BLAKE2b-256 | b21cb330a682345f769941a7d0d5553d3fbe91e05e87e9d2bfcdab650cf08d03 |
Hashes for fastparquet-0.7.2-cp37-cp37m-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dae8b89e8d80813a38748176c1ab217959451c4c0edc5e0129e38952890641ae |
|
MD5 | d6e6f31bb6adc6ef1bef869e533d973b |
|
BLAKE2b-256 | d1a1059cc22410d13feedd6807142412cd2e1b300ec68fa18aee40f00d7a6eb7 |
Hashes for fastparquet-0.7.2-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8c4b9aaf8e423bad91826a60c0077a8b666db1cdff0f788f5f94468cf705091 |
|
MD5 | f2fca260914eeb944f76488e27588a49 |
|
BLAKE2b-256 | 2bf8cb131752fc0620b473087a71f4af6a4c0745570424543a28258f2ff8e0a9 |
Hashes for fastparquet-0.7.2-cp37-cp37m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad92d9f9dc6aa25d5e1717736cee06cbf6a789c58436bb9181dafc0da486d759 |
|
MD5 | 21dd88269881e10859f4f6b12a4b12ad |
|
BLAKE2b-256 | 68195a2e8cd0e9490c6be64992be8512a77f52a499006cdf8c12816a44cb27bd |
Hashes for fastparquet-0.7.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cf73b1b2259440cee973492214079cd4362a83b3b86a58c17a2e8a163123890 |
|
MD5 | d2bb79c7808f6d9eb545d5b4ae1a7bbc |
|
BLAKE2b-256 | ff8b18ead2c29da0ff173e85d237c66e31ab84a589397b6277cb19d8e5d9d8c0 |
Hashes for fastparquet-0.7.2-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 074f409dc6b97d07149aeb2e1ce021ecfca8aa5c9ac43d8a76ea2772d11e4b91 |
|
MD5 | 7d5c8a7a9ac108c2e534c2f830007bf5 |
|
BLAKE2b-256 | 7a2669f73f1e5026dddc52c058733b9dbbee1af52b62969969e376e3b36c3b76 |
Hashes for fastparquet-0.7.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a61022f26cd28a9cf803a1f24c56ca34b5ebdf4d4f7081a49122bcedc53722cf |
|
MD5 | a21a608428724c1a245a02a95a7dcef8 |
|
BLAKE2b-256 | 429c65ff2297b6a8cb26e9c9bc09f8affd6b2916dd451f8bacce51bdf7ced0e2 |
Hashes for fastparquet-0.7.2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d19414927c49eb3a3fe83d8b2b892121b9fb2003683a0661b181014dd310f2e |
|
MD5 | ba85cd43d14c0b5791a33a64ec7559f0 |
|
BLAKE2b-256 | 5c6f4ed90c8b6e47b50174f28eabe07cdfff5549abb95520f8b138123fe64a26 |
Hashes for fastparquet-0.7.2-cp36-cp36m-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e9b03501b65de8897d3f0e8fdcae99aeee1df07b12bb835d4b55595eb49a681 |
|
MD5 | 106c46cad73da2b07d0e361949ab99fa |
|
BLAKE2b-256 | 87bc1511ec61ef1327829cbddaca8bb5a0ec8e37b9ffd37fc5ce54291b4d2457 |
Hashes for fastparquet-0.7.2-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51ed176682fc89a3f087056c0162bddcdc44526c80be0c268e1ba4b4ada78178 |
|
MD5 | 823279d3de3fc0e1185fb4635b3354fc |
|
BLAKE2b-256 | 992c2a70df5e3f702ee49946795d839ccf7b9b22b506a2e754d9fb25cff87232 |
Hashes for fastparquet-0.7.2-cp36-cp36m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 031200ce4b39cb977ff0c3946239af4edd2c9a829b99a0ffa931dbd57253e98c |
|
MD5 | 1647b1ab509c4f5ff10286916efd18e3 |
|
BLAKE2b-256 | 51a5b422893610a74fcac394c4bd0e12f561ee68739823462c8243a9f0f26d80 |
Hashes for fastparquet-0.7.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d58608432036a4ec29021e7c643ae46dc9de98aed18d97c554bf3ca41b020a2 |
|
MD5 | bf877f6c032ff8078c14d7f5ef64e677 |
|
BLAKE2b-256 | 3bac3a85dcee3acd7e3c8ec7eb482a2be5636315bc614fdac7f3926196c10619 |
Hashes for fastparquet-0.7.2-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cc0ba0c866d1002c3636a510308b805995ee420ae8abc83b6110f57ec9be340 |
|
MD5 | b791b1ec71f64c9063185b42e8aa6c74 |
|
BLAKE2b-256 | 04296f243b012d9d3c0936f8bac4fa3932daef566fd7a726dcd8be883aeff6f6 |
Hashes for fastparquet-0.7.2-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88a1fda51c2f92594bb15d24782736a5a949d9f5f68c7bedbfb6d681d392484c |
|
MD5 | 0dc00b927adeed8c26e542fe82290d46 |
|
BLAKE2b-256 | beef368d8f236165e24d36151aac66e753a8d44d5333e41f37f9828ded6ec062 |