Message Boards Message Boards


Computing with Dataset[]: A reductionist approach

Posted 4 years ago
2 Replies
6 Total Likes

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.

2 Replies
Posted 4 years 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.

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.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract