Questions tagged [dataset]

Questions on the Dataset data type and related functionality introduced in version 10. Do not use for questions on data in more generic list format or data-manipulation questions generally.

Filter by
Sorted by
Tagged with
11
votes
2answers
238 views

Missing: KeyGroupBy?

Especially in tree-structured data, keys and values, being two sides of the same coin, frequently interchange roles. The ability to aggregate by value but not by key upsets the balance. How to ...
6
votes
1answer
223 views

Only String Keys supported in Dataset's Association Query?

fixed in 10.0.2 Given data: titanic = ExampleData[{"Dataset", "Titanic"}] This Association Query works: ...
2
votes
2answers
142 views

How to make functions from datasets

I have a csv that encodes the results of plugging certain parameters (say, A and B) into certain functions (say, ...
12
votes
2answers
1k views

Import iTunes xml data and convert it into a dataset or table

I have an xml file with song data from iTunes (https://dl.dropboxusercontent.com/u/1012958/iTunes%20Library.xml) and I'd like to import it to Mathematica to do some statistics. I get an XMLObject like ...
8
votes
2answers
645 views

Advanced SQL-type select statements (filtering) on Datasets

I'm trying to improve on mathematica's handling of datasets. I'm currently writing this function that should do the following. Suppose I have a dataset with columns, e.g. ...
9
votes
3answers
289 views

Problem constructing Association tables with some operators

fixed in 10.0.2 First, set up the example Dataset from the documentation: titanic = ExampleData[{"Dataset", "Titanic"}]; Why ...
9
votes
1answer
563 views

Group dataset on two keys (GroupBy)

I would like to group the elements of row c of the following dataset according to the values in the columns a and b. That is Go from here To here And then I would like to print this on a grid, ...
14
votes
2answers
1k views

Change dataset key name

Using the example in the documentation, how would I make a new dataset with the key "b" changed to key "h". ...
5
votes
2answers
281 views

How to lookup by a string key after GroupBy? Inconsistent data type handling

This is relates to a bug that was introduced in 10.0.0 and fixed in 10.0.1 It also relates to an issue that has yet to be corrected. After applying GroupBy to a ...
11
votes
1answer
166 views

Possible Bug in ProbitModelFit when used in a Dataset

Since upgrading to Mathematica 10 on Mac OSX I have come across a number of instances of this error, which occurs using Probit and Logit model fit. A bit of googling show this is something to do with ...
3
votes
2answers
226 views

Simplifying a time-series segmentation Query

This query segments a time-series and filters out dropout frames. Can it be simplified - ie, made more readable? ...
10
votes
2answers
261 views

Does Dataset round? [duplicate]

I'm importing the following Excel file: My code and its results are: ...
18
votes
3answers
1k views

Export dataset to JSON including Unicode Characters

I'm experiencing a weird issue. Consider a dataset defined like this: dataset = Dataset[{<|"a" -> 1, "b" -> 2|>, <|"a" -> 3, "b" -> 4|>}]; ...
9
votes
2answers
389 views

Median of Dataset in Mathematica 10

Bug introduced in 10.0 and fixed in 10.3 I'm having trouble calculating the median of a Dataset[] in Mathematica 10. The situation is as follows. Consider a ...
18
votes
1answer
2k views

How to split a Dataset into training and testing for machine learning?

Suppose I have iris data In the Dataset Format. How to split the iris data Into training and testing for Machine learning? For example,Transform the data for Classify.
14
votes
5answers
2k views

GroupBy several keys while keeping the Dataset as a Table (List of Associations)

Assume you import data from a Table source of the following format. ...
12
votes
4answers
531 views

Dataset: get number of levels and elements

The summary box for Dataset objects shows the number of levels and elements at the bottom. How can we get these values programmatically? For example, "4 levels, ...
4
votes
2answers
173 views

Create composite key - operating across rows in a dataset

I would like to be able to create a new dataset by extracting 2 columns to make a composite key, and also extracting other columns. For example, suppose my dataset looked like: I would like to ...
11
votes
4answers
3k views

Join two datasets on keys

I want to be able to join two datasets by keys, pretty much like I'd do in SQL. I thought the JoinAcross function might do it, but it doesn't operate the way I thought. The example in the ...
7
votes
3answers
1k views

Display ALL keys in dataset

I created a dateset (estimates) with 25 keys (my columns), and about a hundred rows. I'd like to be able to list the keys from the dataset. I did this: ...
12
votes
5answers
2k views

Export a simple DataSet with key-value associations to CSV in Mathematica 10

I'm trying to Export a simple dataset with key-value pairs to a CSV Export["n.csv", MyDataset, "CSV"] This results in a single-line serialization: ...
10
votes
1answer
166 views

Using MapIndexed[List] on a dataset fails — why?

The following works: MapIndexed[List]@{1, 2, 3} (* {{1, {1}}, {2, {2}}, {3, {3}}} *) This works too: ...
11
votes
2answers
794 views

How to merge Datasets representing matrices with named rows/columns?

I am working with square (non-symmetric) matrices with named rows and columns. The data I receive is sometimes messy and rows/columns may come in various permutations. I usually need to semi-...
9
votes
1answer
286 views

Why is Dataset upset by division by zero?

Consider this example: ...
10
votes
2answers
597 views

Unexpected behavior when using SortBy as a dataset filter

I am still experimenting with datasets. Recently I tried to query the Titanic example to get info on the oldest passengers. Here is what I tried ...
6
votes
2answers
527 views

How can I save a Manipulate's control settings to a dataset?

This is probably an extremely simple question. I have a manipulate that sets variables used to define an offset, amplitude, frequency and phase of a trigonometric function. ...
9
votes
1answer
181 views

Operator syntax for Merge-like Query

Bug introduced in 10.0.0 and fixed in 10.0.2 Is it possible to take advantage of Dataset's Query operator syntax to Merge parallel queries thereby avoiding Function's that are otherwise required? ...
7
votes
1answer
277 views

Possible bug involving Dataset/Query and RightComposition

Bug introduced in 10.0.0 and fixed in 10.0.1 Short Version Why are the results of the following expressions different? ...
14
votes
1answer
376 views

Benefit of using Dataset to collect SQLSelect output

Considering a DatabaseExample included with Mathematica: ...
30
votes
4answers
1k views

What is the natural way of using Dataset to get a FittedModel?

The new Dataset in Mathematica 10 is a great addition to the language, potentially reducing the convenience gap with R. Given this, I would like to understand what the equivalent simple or natural ...
9
votes
2answers
258 views

How to insert zero counts uniformly with Dataset Counts query

Missing[] is generated when an association does not contain the specified key. ...
1
vote
1answer
136 views

How can I append associations with uneven elements? [duplicate]

My dataset is pretty simple so far: ...
19
votes
1answer
760 views

Learning Resources for Data Science in the Wolfram Language

I'm delivering an upcoming course on Data Science with the programming/analysis done predominantly in the Wolfram Language. I created the following table to leverage students' familiarity with Lists ...
8
votes
1answer
309 views

One ChartLegend for multiple charts in Dataset?

Dataset's documentation shows how to leverage GroupBy operator at multiple levels ...
7
votes
3answers
480 views

AssociationMap to query Dataset across levels?

Is there a way to operate on Dataset across levels to apply a function f to a key -> value pair in an Association as follows: ...
16
votes
2answers
684 views

Can't get Append to append a record (association) to a dataset

Bug introduced in 10.0.0 and fixed in 10.1 or earlier The Documentation Center item, Computation with Structured Datasets, implies that Append has been extended in ...
9
votes
3answers
2k views

Converting datasets to nested lists

Imagine the Shipments relation: ...
4
votes
3answers
311 views

How to generate and label multiple histograms as Query operator(s)?

The Dataset documentation doesn't indicate how to label a Histogram with the key. ...
5
votes
2answers
465 views

What are the Slot Names in a Dataset?

I have a dataset which are keyed on {"Item", "Hour of Day", "Value"}. In the examples, I noticed that it is possible to apply functions using such as ...
10
votes
1answer
1k views

Converting structured data to a dataset [duplicate]

A Dataset seems perfect to represent structured data. Has anyone already thought about how to convert as efficiently/elegantly as possible an XML or JSON file to a Dataset in Mathematica 10 ?
4
votes
1answer
645 views

Using Datasets in Mathematica 10.0

Bug introduced in 10.0 and fixed in 10.1 I am trying to use the Dataset functionality which was introduced in Mathematica 10.0 : ...
8
votes
1answer
564 views

Dataset and string conversion, using Internal`StringToDouble

i'm trying to get familiar with the new Dataset-stuff in Mathematica 10. As it will (hopefully) provide some benefit for me, I have started to convert my app to move from list and list of rules to ...
2
votes
0answers
686 views

How do I obtain the Fisher Information Matrix from a data set?

My apologies in so much as this is probably in large part a problem of me not being aware of the necessary mathematics but since this should be a common issue in machine learning and Mathematica now ...
5
votes
1answer
761 views

How can I modify specific key values within a dataset?

Given a dataset, is there a way to modify a value? Example ...
3
votes
0answers
271 views

Combining key pivoting and lookup operators in Dataset

This question is related to this one re pivoting on keys. Because of the nesting, using Leonid's method as starting point - single key: ...
7
votes
3answers
944 views

Normal // Association // Dataset workaround for some user query operators

Given example tabular data (ie, with rows and columns, or "data frames") ...
1
vote
2answers
652 views

Is there an easy way to divide a matrix into four blocks?

I often get a data table with column names and row names. For example: ...
33
votes
5answers
2k views

Mathematica 10 Dataset doesn't format more than 4 columns?

Try this code in Mathematica 10: Dataset@Table[Association[ToString[#] -> # & /@ Range[4]], {2}] I got a nicely formatted table: But when I do the same ...
6
votes
1answer
379 views

MapAt and generic Functions on Associations and Datasets

These are distinct but related questions about mapping functions to Associations and Datasets. Given: assoc = <| a -> 1, b -> 2, c -> 3|> And <...
8
votes
2answers
374 views

Dataset with no members

I am trying to plan a framework for relational algebra using the Dataset capability of Mathematica 10. In the work of Date and Darwen, there are two concepts known as TABLE_DEE and TABLE_DUM. ...