Not sure if this will be the post to ask Seth Chandler questions on the topic of Datasets prior to the Webinar, but I’ll give it a try.
​
While making corrections, I may have answered my questions in this notebook post.
​
I will use the Titanic example Dataset:
In[]:=
titanic=ExampleData[{"Dataset","Titanic"}];

Example: GroupBy

Inside Query, GroupBy[“class”] is a valid operation:
In[]:=
Query[GroupBy["class"]]@titanic
Out[]=
class
age
sex
survived
1st
1st
29
female
True
1st
1
male
True
1st
2
female
False
1st
30
male
False
1st
25
female
False
323 total ›
2nd
2nd
30
male
False
2nd
28
female
True
2nd
30
male
False
2nd
18
male
False
2nd
25
male
False
277 total ›
3rd
3rd
42
male
False
3rd
13
male
False
3rd
16
male
False
3rd
35
female
True
3rd
16
female
True
709 total ›
However, outside of Query, the same GroupBy expression does not work with the “syntactic sugar” Key-notation:
In[]:=
GroupBy["class"]@titanic
Out[]=
class
age
sex
survived
"class"["class""1st","age"29,"sex"
"female","survived"True]
1st
29
female
True
1st
29
female
True
"class"["class""1st","age"1,"sex""male",
"survived"True]
1st
1
male
True
"class"["class""1st","age"2,"sex"
"female","survived"False]
1st
2
female
False
"class"["class""1st","age"30,"sex""male",
"survived"False]
1st
30
male
False
1st
30
male
False
4 total ›
"class"["class""1st","age"25,"sex"
"female","survived"False]
1st
25
female
False
"class"["class""1st","age"48,"sex""male",
"survived"True]
1st
48
male
True
1st
48
male
True
3 total ›
"class"["class""1st","age"63,"sex"
"female","survived"True]
1st
63
female
True
"class"["class""1st","age"39,"sex""male",
"survived"False]
1st
39
male
False
1st
39
male
False
3 total ›
"class"["class""1st","age"53,"sex"
"female","survived"True]
1st
53
female
True
1st
53
female
True
"class"["class""1st","age"71,"sex""male",
"survived"False]
1st
71
male
False
1st
71
male
False
rows 1–10 of 402
For the GroupBy to work, we should use the Key-notation or Slot-notation instead:
In[]:=
GroupBy[Key["class"]]@titanic
GroupBy[#class&]@titanic
Out[]=
class
age
sex
survived
1st
1st
29
female
True
1st
1
male
True
1st
2
female
False
1st
30
male
False
1st
25
female
False
323 total ›
2nd
2nd
30
male
False
2nd
28
female
True
2nd
30
male
False
2nd
18
male
False
2nd
25
male
False
277 total ›
3rd
3rd
42
male
False
3rd
13
male
False
3rd
16
male
False
3rd
35
female
True
3rd
16
female
True
709 total ›

Example: Select

Select only works with the Slot-notation and does not work with the Key-notation; not even inside a Query.
In[]:=
Select[#class=="1st"&]@titanic
In[]:=
Select[Key["class"]=="1st"]@titanic
Out[]=
In[]:=
Query[Select[Key["class"]=="1st"]]@titanic
Out[]=

My question

GroupBy[“class”] “syntatic sugar” notation outside of Query does not work, unless we use the Key- or Slot-notation. I suspect because the expression is otherwise ambiguous.
​
​Select only accepts the Slot-notation, because the predicate required for Select expects a (pure) argument.
​
Is this correct or is there a difference in the way we should interpret the Key- versus Slot-notation?