Message Boards Message Boards

Computing with Dataset[]: A reductionist approach

GROUPS:

Dataset[] is an amazingly powerful function with excellent memory use and speed. Dataset[] obtains these virtues at the expense of an idiosyncratic programming language. Once understood, the language is very useful. However, understanding this language requires effort and a reductionist approach.

The text and examples in the attached file are intended for a programmer who has worked through the examples in Mathematica's Dataset[] documentation. It is intended to convey an approach to Dataset[] programming that can be successfully applied to most or all Dataset[] problems. The material is intended to be useful to all programmers, including business and financial analysts, who frequently find their data sources to be rectangular arrays in .csv or .xl family format. The material contains a section on converting such lists to Dataset[]. Applicability of the general approach is not restricted to rectangular arrays, but only rectangular arrays are considered below.

Corrections from Dataset[] implementers are welcome. Identification of typographic errors is welcome, as is identification of programming errors.

Attachments:
POSTED BY: Bill Lewis
Answer
1 month ago

Thanks Bill, there's little information about using dataset so this is welcome. I tried working with them several times but to me getting data out of the set is more complicated then using lists. Must be my knowledge.. I used data sets to "mine" through a JSON data stream returned by an API call. The clicking and drilldown feature was great! However extracting the values in all these nested associations was not trivial.

POSTED BY: l van Veen
Answer
1 month ago

Once you learn to drill down (and up) with Dataset[ ] while applying functions, you will never go back to using just lists. Your code will be shorter and easier to understand. I rarely use Dataset[ ], but I use Query[ ] on lists of associations all the time.

POSTED BY: Gustavo Delfino
Answer
1 month ago

Group Abstract Group Abstract