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

bug: pivot_longer() doesn't support iterable of strings #6115

Closed
1 task done
NickCrews opened this issue Apr 29, 2023 · 4 comments · Fixed by #6117
Closed
1 task done

bug: pivot_longer() doesn't support iterable of strings #6115

NickCrews opened this issue Apr 29, 2023 · 4 comments · Fixed by #6117
Labels
bug Incorrect behavior inside of ibis

Comments

@NickCrews
Copy link
Contributor

What happened?

The docstring claims this should work, but it only works with a single str or a full fledged selector.

PS I love the names pivot_wider and pivot_longer. So much better than the melt and explode. Thanks for adding this function, this would have been a doozy for me to implement myself.

What version of ibis are you using?

main

What backend(s) are you using, if any?

NA

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@NickCrews NickCrews added the bug Incorrect behavior inside of ibis label Apr 29, 2023
@cpcloud
Copy link
Member

cpcloud commented Apr 29, 2023

Seems easy enough to remove this part of the docstring!

@NickCrews
Copy link
Contributor Author

But it SHOULD work with multiple columns, should the long term goal be to fix it the other direction?

@cpcloud
Copy link
Member

cpcloud commented Apr 29, 2023

It does work with multiple columns, you can use a selector!

t.pivot_longer(s.c("a", "b", "c"), ...)

@NickCrews
Copy link
Contributor Author

Yeah, but I've managed to avoid selectors through the rest of my code, I am importing selectors just to use them in this one place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behavior inside of ibis
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants