list = {{a, b, c, e}, {1, 2, b, h}, {"a", "h", 3, 5}};
asso = GroupBy[list, {#[[1]], #[[2]]} &]
<|{a, b} -> {{a, b, c, e}}, {1, 2} -> {{1, 2, b, h}}, {"a","h"} -> {{"a", "h", 3, 5}}|>
There is a problem in this code, since "a" and "h" might be two keys. However, KeyExistsQ is not Listable, but KeyTake is.
KeyExistsQ[asso, {"a", "h"}]
True
KeyTake[asso, {"a", "h"}]
<||>
So I wrap Key around {"a", "h"} to eliminate ambiguity.
KeyTake[asso, Key[{"a", "h"}]]
<||>
Contrast the above with
KeyDrop[asso, Key[{"a", "h"}]]
<|{a, b} -> {{a, b, c, e}}, {1, 2} -> {{1, 2, b, h}}|>
Have I found a bug? Tested on V10.4
KeyTake[asso, {{"a", "h"}}]... – ciao Apr 11 '16 at 08:28Keyto work. I think you should report it to WRI. – Edmund Apr 11 '16 at 09:50{x,y,...}is an argument with multiple keys,{{x,y,...}}is an argument with a single, compound key. – ciao Apr 12 '16 at 22:28KeyDrop. See update to my answer below. – m_goldberg Jul 08 '16 at 10:14