Dataset: Sort the rows by theire values

Hi everyone,

I am new in the mathematica community and I have a probably easy question for you regarding how to sort a dataset as the following so that I have sorted the values in the fist row descending from 44 in the first line down to 3 in the last one.

dataset = Dataset[{
<|“a” → 6, “b” → “x”, “c” → {1}|>,
<|“a” → 8, “b” → “y”, “c” → {2, 3}|>,
<|“a” → 44, “b” → “z”, “c” → {3}|>,
<|“a” → 4, “b” → “x”, “c” → {4, 5}|>,
<|“a” → 5, “b” → “y”, “c” → {5, 6, 7}|>,
<|“a” → 3, “b” → “z”, “c” → {}|>}]

Many thanks for your support and best regards

Hi,

you can easily sort the underlying association:

Reverse@Sort[dataset // Normal] // Dataset

Alternatively,

Sort[dataset][Reverse]

should work.

Cheers,

M.

Perfect! Thank you very much for your quick response!