-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[DOC] execution order in .when() chain #7725
Comments
I think your counter-intuitiveness stems from your understanding of the IF column A = "T":
C = "T"
IF column B = "F":
C = "F"
ELSE
C = "C" when it is actually more like: IF column A = "T":
C = "T"
ELSE IF column B = "F":
C = "F"
ELSE
C = "C" In the first case, the second |
@avimallu I see... Thanks for the explanation.. So if...elif...that's easy to understand. |
The documentation is lacking here indeed. I have made an attempt to clarify this (+optional otherwise) in #7793. Feedback welcome. |
Problem description
I encounter a situation I think it's important to be mentioned in the doc:
I want to use T in a when T and use F in b when F. There is a conflict at row 4 in which you have both T and F:
But if I change the order of the when()chain:
If this is the expected behavior and the result also corresponds to the order of the chain. I would say it should be mentioned in the doc. This is also kind of counterintuitive as a later expr does not cover the results of an earlier expr, but the earlier one is the finial one.
The text was updated successfully, but these errors were encountered: