You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ENH: Preserve DataFrame divisions when reading from parquet using pyarrow #3383
When a dataframe with known divisions is saved to parquet, and then read back from parquet using the pyarrow engine, the division information is not preserved.
there's currently no attempt to identify the division information when reading parquet using pyarrow
This wasn't possible before arrow 0.9.0 (recent release), but now is kind of possible. Arrow still doesn't write a single metadata file, but the statistics are now available via the python bindings, so a full scan of all parquet files in a dataset could allow for recovering the divisions.
I'll probably play around with this a bit over the weekend. I need to come up with at least a workaround soon.
@jcrist@mrocklin Should there be any API changes when divisions support is added? Or, would it be acceptable to simply return a DataFrame with known divisions when possible (e.g. when the parquet dataset has the right structure and pyarrow >=0.9.0 is available)?
I think that there is an active question of if we should do this or not. Looking through the metadata of each of the parquet files individually might be expensive, particularly if they are remote.
Activity
mrocklin commentedon Apr 6, 2018
cc @xhochy
jcrist commentedon Apr 6, 2018
This wasn't possible before arrow 0.9.0 (recent release), but now is kind of possible. Arrow still doesn't write a single metadata file, but the statistics are now available via the python bindings, so a full scan of all parquet files in a dataset could allow for recovering the divisions.
jonmmease commentedon Apr 6, 2018
I'll probably play around with this a bit over the weekend. I need to come up with at least a workaround soon.
@jcrist @mrocklin Should there be any API changes when divisions support is added? Or, would it be acceptable to simply return a DataFrame with known divisions when possible (e.g. when the parquet dataset has the right structure and pyarrow >=0.9.0 is available)?
jcrist commentedon Apr 6, 2018
No, this should just work the same as with the fastparquet engine when possible. No need to change the api.
PRs definitely welcome :).
mrocklin commentedon Apr 7, 2018
I think that there is an active question of if we should do this or not. Looking through the metadata of each of the parquet files individually might be expensive, particularly if they are remote.
jcrist commentedon Apr 17, 2018
Fixed by #3387. Closing.