-
Notifications
You must be signed in to change notification settings - Fork 617
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
docs: cases() documentation doesn't work for me at all #10535
Comments
Thanks for flagging this! The issue is that If you do not want to install from source, you can still use In [1]: import ibis
...: ibis.options.interactive = True
...: t = ibis.memtable({"values": [1, 2, 1, 2, 3, 2, 4]})
In [2]: t.mutate(
...: case_expr=ibis.case()
...: .when(t.values == 1, "a")
...: .when(t.values == 2, "b")
...: .else_("unk")
...: .end()
...: )
Out[2]:
┏━━━━━━━━┳━━━━━━━━━━━┓
┃ values ┃ case_expr ┃
┡━━━━━━━━╇━━━━━━━━━━━┩
│ int64 │ string │
├────────┼───────────┤
│ 1 │ a │
│ 2 │ b │
│ 1 │ a │
│ 2 │ b │
│ 3 │ unk │
│ 2 │ b │
│ 4 │ unk │
└────────┴───────────┘ I apologize for the inconvenience; I can understand how frustrating this is. We should get another release out before too long. |
Thanks @IndexSeek Appreciate the apology, but not a big deal for me. This is bad UX for an end user. It could be worth considering any of the following, which might help with this issue:
Thanks. |
I agree this is a pain point that should be improved. See #10371 (comment) as a workaround that should make it easy to begin using the new API now, and then you can delete this compatibility code once you upgrade to 10.0.0. My favorite as both a reader of the docs, and as a maintainer of the docs, is option 1, so I implemented that in #10551. |
I think most docs do this. 😅 As somebody who has also been confused by the docs showing things that aren't available in the latest released version on many occasions, I wonder how hard it would be to have versioned docs? But it seems the Quarto team doesn't plan to support it? quarto-dev/quarto-cli#474 (comment) |
About 2 years ago, it appears we made the decision to explicitly move from versioned docs to unversioned docs: #5347. I personally think this was the right choice, and I personally would make the same choice again today. Not sure what other ibis maintainers think. |
It's not worth the overhead, in my mind. I do push up historical docs when I remember to. (https://ibis-project.github.io/ibis/) One thing we could do is have a |
We can probably link to the older versions somewhere on the main site too, if we don't already. That would mostly solve the problem here IMO. |
Please describe the issue
Can't get the conditional cases() examples to work (as opposed matching on a value), am I missing something?:
I tried other examples that specify I should be using
else_
kwarg, and it complains about it not existing, and it looks like it should bedefault
?This is another verbatim from the docs:
Code of Conduct
The text was updated successfully, but these errors were encountered: