« first day (1988 days earlier)      last day (2493 days later) » 

7:20 AM
Hello
 
8:04 AM
Is there any specific reason why KeyExistsQ doesnot work with keys list? Like for example KeyDrop does?
 
8:55 AM
@Kuba My guess is that by convention *Q functions always return exactly true or false, not a list of booleans.
 
@MichaelHale I want True or False not a list of booleans. And *Q is not respected anyway, which hit me couple of times.
I very often do MemberQ[Keys[#], {key1, key2}] which I wanted to avoid.
Another way is to match KeyValuePattern[{key1->_, key2->_}] but that is even less handy.
 
@Kuba I don't understand your MemberQ example. MemberQ[{1, 2, 3}, {1, 2}] returns False.
But it's not immediately clear to me if you would want KeyExistsQ with a list to act like ContainsAny or ContainsAll.
Although I guess based on your KeyValuePattern example you would want it to act like ContainsAll.
 
@MichaelHale Sorry, I meant ContainsAll.
But yeah, your question about whether is should mean All or Any makes sense.
I'd say All but I see that is not objective thus the syntax limitation, probably.
 
 
14 hours later…
10:41 PM
Why is it necessary to do dataset[All, <|#, "key" -> If[#otherkey == "value", f1, f2][#key]|> &] ? I don't understand why dataset[All, {"key" -> (If[#otherkey == "value", f1, f2]&)}] doesn't work. ("... is expected to have an Association as the first argument")
or something to that effect
 

« first day (1988 days earlier)      last day (2493 days later) »