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
ENH: add Series.__iter__, closes #4871 #5071
Conversation
@mrocklin test added. |
Co-Authored-By: Matthew Rocklin <mrocklin@gmail.com>
@BlaneG the test failure looks related: https://travis-ci.org/dask/dask/jobs/558604032#L977 can you take a look?
|
@TomAugspurger, @mrocklin, I addressed the test failure. Do you want to review changes to the if/else statement I made in the rename function to address this test failure? After adding the
Do you have some more insight on the if condition that I changed? Also, maybe I should add an else statement with an assertion error when the if/elif conditions are not met? |
I don't really follow the changes to the |
That makes sense @TomAugspurger. |
|
||
if is_scalar(index) or (is_list_like(index) and not is_dict_like(index)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be something like not isinstance(index, Index)
. You might need this condition in addition to the is_list_like and is_dict_like checks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you mean...adding and not isinstance(index, Index)
to the end of the if statement will avoid the error when passing a dd.Series index to rename
. I was originally trying to make the conditions noted in the docstring explicit in the else statement: If dict-like or callable, the transformation is applied to the index
.
-replace is_list_like(index) with isinstance(index, dd.Series)
Merged master to fix the CI issues. |
Thanks @BlaneG! |
black dask
/flake8 dask
Here is the test output: