Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle kdims referencing multi-index in dask #2789

Merged
merged 1 commit into from
Jun 11, 2018
Merged

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Jun 9, 2018

Since dask dataframes do not support multi-indexes the current code does not detect when a multi-index is referenced. The only way of checking whether the multi-index exists is to speculatively reset the index (which is almost free when using dask) and check whether the columns exist on the reindexed dataframe. This code now resets the index and uses the reindexed dataframe if the columns are present there (otherwise the validation code will complain about missing columns as before).

  • Adds unit tests

@philippjfr philippjfr added type: bug Something isn't correct or isn't working tag: component: data labels Jun 9, 2018
@philippjfr philippjfr force-pushed the dask_multi_index branch 3 times, most recently from 62072ee to 41e5cc4 Compare June 10, 2018 13:34
@philippjfr
Copy link
Member Author

Ready to merge once tests pass.

@jlstevens
Copy link
Contributor

Looks good though I think it is worth adding a comment to the code to explain the approach (i.e '# speculatively reset index to detect....' or something similar).

@jlstevens
Copy link
Contributor

Looks good and the addition of the comment definitely shouldn't affect the tests. Merging.

@jlstevens jlstevens merged commit 6224bb7 into master Jun 11, 2018
@philippjfr philippjfr deleted the dask_multi_index branch July 4, 2018 11:12
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tag: component: data type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants