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 >= 0.29.23 (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-2023.1.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e873286445e0850a5f044c71b9c3f55279a1fbd7b7e39590c866f24de5ce850f |
|
MD5 | 1ff811f18d9b81eb5b81c0010324dec3 |
|
BLAKE2b-256 | 85c11121eef85efa6258dbb1d51df944894e810994ad500de62fab0a7291fd49 |
Hashes for fastparquet-2023.1.0-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c40fe744c478c64105dae97b1bdf10709c5f730f12fbeaa719a6714513c4eb7e |
|
MD5 | 8e7437f5db7f323afa8b35f226cb76da |
|
BLAKE2b-256 | aed16dc0cc2ede895033cd87a522edd920d052844936c6e6852d85ee83481251 |
Hashes for fastparquet-2023.1.0-cp311-cp311-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02e0619a86e9e328373cbfb22fceb8e4054b6d32badffb565ff21d7a3566ed38 |
|
MD5 | 908ea01817dbdd8609488dd927a6c510 |
|
BLAKE2b-256 | 25349a2e0e88b72ae47526b88bca11b21cd995f8c070c4d6bab323f74365420e |
Hashes for fastparquet-2023.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98065a55bfbedddcc237a791109ea9b3ac3e8008318e4c8e7b39227219494e4b |
|
MD5 | 5f3884cd3533de6e938ded08c4a02ddd |
|
BLAKE2b-256 | 577d9c13b9a67e337fb8b5b4e2051641bdb13e926bcfd318d181b97553ca208a |
Hashes for fastparquet-2023.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ebcaa49b57d4f11112160e80f3feab1a36af68072e415672da985930c66c3a2 |
|
MD5 | 928bf0bbf78281aa4fc85218b007aa1d |
|
BLAKE2b-256 | 49663740dd7582dca2f271f1c34b50aec6b3e75f6e4b36a51e79b7ca27f87437 |
Hashes for fastparquet-2023.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0db7578d62945e4b9b6e983afc0f15fe9d82f47f76ebc3cdbd713c5fadd4ea84 |
|
MD5 | fe4b05730dfb7a3dc03f9856fb9abb1a |
|
BLAKE2b-256 | f6fe5bab4c32a55831eb84f0dae22f94d26150c6c4e393b075f59158b64f9e9d |
Hashes for fastparquet-2023.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cec14b87d5f721ba85e0fc0797a9adfb751d8e501863b5c587da09c2e65f2095 |
|
MD5 | df29e3dc8254de9382b4a44355afc9fe |
|
BLAKE2b-256 | 7870424e5ac86f57c37a60069d29b41c67942f6d4656de08246008b889be22dc |
Hashes for fastparquet-2023.1.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb3c6406e086db3bf5835a62e46626111928e50bad5bfe56e63d40d293303be1 |
|
MD5 | c7910c21d4c48167a593d7f92a057a92 |
|
BLAKE2b-256 | 5b18e7aba247e1481d670697d087631b3d27493489a13502bf5f18c293193066 |
Hashes for fastparquet-2023.1.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a104fede9b113e079a9e480242de809b0eacb95d718d20c3a9e14a65cffd4031 |
|
MD5 | 997581664df55c40f599878284f29277 |
|
BLAKE2b-256 | c2a091e3142725f4aa0aac9c84bcf6f335e0ca1e4939da608b63e932f3db61cb |
Hashes for fastparquet-2023.1.0-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fafd22c2a799ae9f3fcc6c1763d2480da3d47199beb6c8667b04d688a5507905 |
|
MD5 | 134580c82160eb72d5a6195201302737 |
|
BLAKE2b-256 | 1a0c1dc5cf3c330407f731fadf9f57ce4480fab42d6475e4e3b6b4093118dd5e |
Hashes for fastparquet-2023.1.0-cp310-cp310-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dea4af358ff2b55101d7708e9309283ec6dacd99d42b7060d79d5c1227bfa079 |
|
MD5 | 53437cb70e5dc328149e00ea5d1dcc74 |
|
BLAKE2b-256 | dc5545590ce8841f30d09bcde7e6a743f33d70404f7b3e9a8d02a4bf6acd16cc |
Hashes for fastparquet-2023.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 993079d95120ab234b7bfae200c3b7f56b16df4e284c62353a466dbfce951d23 |
|
MD5 | cbc85365750e804bdb4ab5ed7b1a19e6 |
|
BLAKE2b-256 | 3421bc9b1ddec23e8393f50ddeb8d5dc991867c342b75a34c436bf59240bf020 |
Hashes for fastparquet-2023.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c00c47cce430204f4e7c007f84e420feada5676a6e752e093ca039cab5fa7370 |
|
MD5 | 6152fe3bb34b5f454889d03276a0d4ba |
|
BLAKE2b-256 | 198558404653154672486730e229aecb266d96dc19fbb8507be0dd0af8d38c4c |
Hashes for fastparquet-2023.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74ebaff8f4f7922f44953161770c44a88b61dccd3cc11393f20856e34c3cf05c |
|
MD5 | 8dc9ac7ccbd499174a5d54c1029dd068 |
|
BLAKE2b-256 | 09110c990b6018c8354c86fe9508a9110790cd3e0e67ba6f7e392f1b38715b5c |
Hashes for fastparquet-2023.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bcf1e969a42f8dabedca2cb255e7649d0725eafebf1e897450d84af504a5c70 |
|
MD5 | 9a6760eb54f5e30d9442849aee3e3f45 |
|
BLAKE2b-256 | 676ed372358bb20901c82ff546ea1449c9e6e034552c8f93d0b73d527ec034e3 |
Hashes for fastparquet-2023.1.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8256c56bea62d43fd26307f68fd2ad281a1b21478b64a94bb94a01681a97583 |
|
MD5 | 7fc27e65234dd4f63065f2260113d03c |
|
BLAKE2b-256 | 50de0aba2473e4c9d0a79920d696b26b3c73edf09b0fb0c46f5ac88021d0f43a |
Hashes for fastparquet-2023.1.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11adc51b17af433db8486b9be959c806034d44184e073249bd3285db85dc768e |
|
MD5 | c2599ffca0141dbe2d4056738b562e8b |
|
BLAKE2b-256 | 7c410bcacc9f66060f94e9a382726ce73dea074327f6a5fcda75479954df0dc3 |
Hashes for fastparquet-2023.1.0-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 851fa21b1df421d8acadfd10025d7721c46c2182d4a64cef9a3811fa4a25a2eb |
|
MD5 | 109dead8bd0ec69956c477493da5a80a |
|
BLAKE2b-256 | 5808040ce055f4857a2fbbe8f2ce1ceecd975751f09df8cc8efa5f973bc14f65 |
Hashes for fastparquet-2023.1.0-cp39-cp39-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fdfc1adcbc0ea1d05f9ac3576cf12732189c54e4b1c9d38da990dc36d9cc348 |
|
MD5 | c62b3345176197a8caa8352607537d94 |
|
BLAKE2b-256 | 9af0c7b5a7c9ad52ddd281b7c27fa3ac7f840a5c476a19529282a075382b0ed0 |
Hashes for fastparquet-2023.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09e2bcca0d95867b0364637a02d032844a496a47c2a2926e007a126e2bc25f55 |
|
MD5 | 2eb5f5c66033224ef7ff95808ca991ba |
|
BLAKE2b-256 | 556e100b64a9ef61b17486f41249f8a03341a1e649f7b7a9bec2ec61cee98689 |
Hashes for fastparquet-2023.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1096fdebb87a9630b69bd7c68185783a337d01c1cd24916b1489ecb82b55cefb |
|
MD5 | a29d420338e57d2dc0bb4e6202c8b0b9 |
|
BLAKE2b-256 | 13bcdd198efd89cc93fe88bc13b8311b893abee3338ce43f4d40f559a9e16b83 |
Hashes for fastparquet-2023.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 201b05ececa2e2e607230039cea6f9e0027837e8e273c8ad83886f10699bc9c9 |
|
MD5 | 88ae64d06f45b1b816fac885ee4eb447 |
|
BLAKE2b-256 | 091d3ac895547d35913ca415c590e5e49b09f3c327acb12aeecf1a6f0937e477 |
Hashes for fastparquet-2023.1.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97b978b90037d312d673dfd2e2c17cca85c692eaa9373f44856b1d5ed48a8cec |
|
MD5 | 34037b6348e16f25353e984d524561b1 |
|
BLAKE2b-256 | 7424664687395c2e9f193103445763548da1c099ea8848d36c98373763e98793 |
Hashes for fastparquet-2023.1.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3feb1758b7b746e92d7aef64a013a0402a5919ff0147803276bc40e102141815 |
|
MD5 | 464fcaf4b63ffa2055915c449a057219 |
|
BLAKE2b-256 | 094f988d44a910a6386f92d3c4b338e2ce83fdac0d8a09806025a1600fcaf016 |
Hashes for fastparquet-2023.1.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76dd48cb568c4596baded551251f870a3690a43893e29653baf26062549b82b3 |
|
MD5 | 7f01d7d366faf48ea5012a107a56714b |
|
BLAKE2b-256 | 278d78cb48b493b52802619774177500ab3efe2e21afe73943365bc5d7bab31a |
Hashes for fastparquet-2023.1.0-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3a1ae4dbd079bc4b195249a0791a187c45b9b1802af947167c8d76a01cd8a79 |
|
MD5 | 227c32c3687a85c1a5100c3c6a85ecc2 |
|
BLAKE2b-256 | 4819f77aa6e385bd0334b8c7813a34b370e0802046e2be74a0a631c095a639c1 |
Hashes for fastparquet-2023.1.0-cp38-cp38-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d138a35979d72e4e2e1c06a6f275ea8b8885d1484e791fa7ad148af3aca8878 |
|
MD5 | 19d644b9a5d6a6e0f6c936b9e215308d |
|
BLAKE2b-256 | 0182f763c8b962e34afe8447938d57d2dddd58704bc34bb098f7a39bc3d01016 |
Hashes for fastparquet-2023.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00347f09a060852ce4330ce678c638977faf6fdb5c29caf89ad5651e0f0d7621 |
|
MD5 | 952bcba2a477e4f52b6ec2d005d34555 |
|
BLAKE2b-256 | 1d57ca4b91822829ccd93b8db8a5db75183aed871e0291d8612b8f3fdf2af230 |
Hashes for fastparquet-2023.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 568406db0c7fc37179e468503221e526a4945e553d145fbf1f6344b5b3a8c8e6 |
|
MD5 | bbacc8b5c4c7e52836c4ed002ba4d7c8 |
|
BLAKE2b-256 | d73d27121152560920ae42c63f3f4c596680c6574464e467b86a98e3c3775442 |
Hashes for fastparquet-2023.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5efcb6e0280fe8e103e8a5f6bf4a5ecd32915d3f9959a4e85f64661c7cbecede |
|
MD5 | a2a60570b966bf8c2949b9e9483dc4cb |
|
BLAKE2b-256 | e98a6f7198406e2f7838ecbe92872190f4e9d419598f9002a4bfe94c12346ccb |
Hashes for fastparquet-2023.1.0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc6af1f2b2f9c29f1e61097fa7a8adcbf568815dea787ed2d2590d1ec8467826 |
|
MD5 | 4af3f8cf0a039c7967826cd0ab9b93a6 |
|
BLAKE2b-256 | cf84c382cb188de46d88841a6e56f86d9436dde6804967fefa224def781c3d4c |
Hashes for fastparquet-2023.1.0-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72fcd440472a4acfda2ab2007c2c23de37bce33ad4c609ab095aeb00012e699c |
|
MD5 | 87874296f90b9e1c36b2877b47f28602 |
|
BLAKE2b-256 | 07df773ebeb49765b61732182ffecd8e3841eac2f975fb86aa6f57b169d6f939 |