Add support for reading/writing parquet files with fastparquet#253
Merged
Add support for reading/writing parquet files with fastparquet#253
Conversation
Test alternate approach to supporting parquet I/O using the fastparquet library instead of pyarrow. Both libraries should produce similar results, but fastparquet is smaller and focused solely on this format.
This was referenced May 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of proposed changes
We need support for reading/writing parquet files to prepare submissions to the SARS-CoV-2 variant hub [1]. pandas supports two backends for parquet I/O [2] including pyarrow and fastparquet. The pyarrow library provides a more comprehensive set of tools for the Arrow spec [3], while fastparquet is defined to provide a minimal library for the parquet format.
I've opted for the smaller fastparquet library here, since it provides exactly the functionality we need for an additional 4 MB of Docker image size. The pyarrow library will eventually be a required dependency for pandas [4], so we may eventually need to include to that library. However, pyarrow adds 40 MB to the Docker image size most of which is functionality we don't need.
[1] nextstrain/forecasts-ncov#132
[2] https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html#io-parquet
[3] https://arrow.apache.org/docs/cpp/user_guide.html
[4] https://pandas.pydata.org/pdeps/0010-required-pyarrow-dependency.html
Related issue(s)
Alternative to #252
Required for nextstrain/forecasts-ncov#132
Checklist