How do I pivot a Dataset?
Pivoting creates columns named after the data value of some column. Because Datasets must have known schema, you cannot create an arbitrary pivot, because the names of the columns won't be fully known for all cases. However, if you know what the names of the columns are, you can use an aggregation function with any_not_null() to simulate the effect:
You may also want to look at pivot_array() which lets you transpose between arrays, and key/value objects.