Skip to content

Fix failing parquet test - #5075

Merged
TomAugspurger merged 1 commit into
dask:masterfrom
jrbourbeau:fix-parquet-test
Jul 8, 2019
Merged

TomAugspurger merged 1 commit into
dask:masterfrom
jrbourbeau:fix-parquet-test

Conversation

@jrbourbeau

@jrbourbeau jrbourbeau commented Jul 6, 2019 •

Copy link
Copy Markdown
Member

This PR removes explicitly setting index=True when calling pandas to_parquet in test_roundtrip_from_pandas. The index= parameter was added to to_parquet in pandas version 0.24.0, leading to test failures on the CI when tested against older (yet still supported) versions of pandas (ref https://travis-ci.org/dask/dask/jobs/554929402#L1107-L1139).

This issue wasn't caught before because the CI had pyarrow 0.13.0 installed and skipped the test. With the new release of pyarrow 0.14.0, this test is no longer skipped and the test failure showed up.

Fixes #5073

  • Tests added / passed
  • Passes black dask / flake8 dask

@jrbourbeau

Copy link
Copy Markdown
Member Author

Removing index=True makes to_parquet fall back to the default parquet engine behavior, which is to store the index as a column. So IIUC not specifying a value for index in to_parquet should have the same effect as setting index=True.

cc @rjzamora

@jrbourbeau jrbourbeau mentioned this pull request Jul 7, 2019
@rjzamora

rjzamora commented Jul 8, 2019

Copy link
Copy Markdown
Member

@jrbourbeau This looks good to me - Thanks! You are correct (AFAIK) that not specifying index=True for to_parquet should not matter in this particular case. I recently added it for clarity/explicitness, but I wasn't thinking of earlier pandas versions :)

@TomAugspurger
TomAugspurger merged commit 381457a into dask:master Jul 8, 2019
@jrbourbeau

Copy link
Copy Markdown
Member Author

Thanks for the review @rjzamora!

@jrbourbeau
jrbourbeau deleted the fix-parquet-test branch July 8, 2019 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parquet test failing

3 participants