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
61
votes
6answers
9k views

How can I add a column into a existing Dataset?

I'm very excited about the brand new Dataset function. I have played with it in Wolfram Cloud, and haven't figured out how can I add a new column into an existing <...
40
votes
2answers
2k views

Dataset vs an association of associations

Associations with a record structure (e.g., a flat table) can be organised in one of two main ways. First as a list of associations, which is also used in the case of Mathematica's data set ...
38
votes
4answers
2k views

Error changing Dataset using Part

Update It was a bug in the documentation of V10.0, this functionality was not implemented yet, and V10.1 changed the documentation, removing it. It's a pity, because it's a very useful operations, ...
36
votes
5answers
3k views

Show More Rows of Dataset

Dataset rather conveniently truncates the display of a dataset that has many rows. However, occasionally, I would like to show more of a dataset without having to ...
36
votes
1answer
631 views

Visualizing Type System Operations

With the introduction of Dataset in version 10, Mathematica acquired a static type-checking subsystem. A fair number of dataset-related questions here on MSE ...
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 ...
31
votes
1answer
2k views

How does Dataset compare to DataFrame in pandas?

Pandas is a Python package providing fast, flexible, and expressive data structures designed to make working with “relational” or “labeled” data. Just like ...
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 ...
23
votes
1answer
432 views

Why do lookup times in Dataset and Association differ by orders of magnitude?

Consider the following three data structures: a list of rules, an association, and a dataset: ...
20
votes
2answers
363 views

Query: adding additional operator changes meaning of preceding operators

Consider the following query: Range[5] // Query[Select[EvenQ] /* Append[1], f] (* {f[2], f[4], 1} *) It selects the even numbers, applies ...
20
votes
2answers
407 views

10.2 Dataset extraneous print using Transpose

Bug introduced in 10.2 and fixed in 10.2 (by paclet update GeneralUtilities 10.2.1) This is probably patch code in 10.2. Is there a way to turn off print with ...
19
votes
3answers
914 views

Applying different functions to different columns of a Dataset

Suppose I have different functions: Total, Mean and Max and the following ...
19
votes
2answers
366 views

Dataset seems to break Information

Bug introduced in 10.0 and fixed in 11.0.0 Dataset is new in 10.0 Note: In order to reproduce the bug, the symbol Dataset may ...
19
votes
3answers
665 views

Dataset seems unable to handle ListDensityPlot and ListContourPlot

If I create a Dataset: ...
19
votes
1answer
1k views

best practices for saving Datasets and TemporalData to a SQL database

I have been working with a simulation tool that generates large volumes of data, and it's time to start saving this to a proper database. Is there an established mechanism for saving TemporalData ...
19
votes
1answer
756 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 ...
18
votes
3answers
1k views

Assign names to Dataset columns

I am constructing a dataset like so: data = Dataset[AssociationThread[Keys[characterCounts], charFrequencies]] which gives me a dataset that looks like this: ...
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|>}]; ...
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.
18
votes
1answer
179 views

Possible bug with Dataset formatting for incompatible shapes and Missing

Bug introduced in 11.0.0 and fixed in 11.1 A support case with the identification [CASE:3707497] was created. [...] It does appear that Dataset typesetting ...
18
votes
0answers
168 views

Inefficient memory storage for Dataset

Why Dataset doesn't serialize its contents, isn't it the whole point? I expect it to behave similar to python's pandas.DataFrame,...
17
votes
7answers
1k views

How to search Dataset to find all keys share same Value

If I have the following Dataset ...
17
votes
2answers
825 views

Exporting Dataset to WDX format fails

I reported this to WRI support. Tracking number is CASE:3368636 Official answer is: Thank you for contacting Wolfram Technical Support. This is a known issue and our developers are working on a ...
17
votes
0answers
217 views

V10's TypeSystem - what are these function useful for? [closed]

The symbols in the TypeSystem` context are clearly used for working with Datasets, but they seem powerful. I was hoping that someone could help explain how they work and is they are useful for ...
16
votes
3answers
916 views

Simple way to concatenate Dataset columns

Consider these two datasets: d1 = Transpose@Dataset[<|"a" -> Range[5]|>]; d2 = Transpose@Dataset[<|"b" -> Range[5, 1, -1]|>]; {d1, d2} What's ...
16
votes
2answers
969 views

Change Values in Dataset under Condition

I have the following Dataset: ...
16
votes
2answers
681 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 ...
16
votes
2answers
321 views

Dataset shows an “All” Key when it contains a List of Associations

From a process I have a Dataset similar to this minimal example. ...
15
votes
3answers
430 views

Deleting noisy data from a plot (manually) and export the best remaining data

I have the following temperature time-series. As you can see it contains very very noisy points in some periods (Fig.A). I tried to approach the best data(the black one in the center) based on the ...
15
votes
2answers
417 views

Temporal database reconstruction in mathematica

<EDIT> after some internet research I found the database domain that deals with this kind of thing: Temporal Databases. I think my question therefore becomes how to reconstruct a temporal ...
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. ...
14
votes
4answers
566 views

How can a field be efficiently added to a Dataset?

Let's use the example Dataset: ...
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". ...
14
votes
2answers
738 views

How to work with a Dataset?

I have an application for which a Dataset appears useful. I want a structured dataset which consists of a set of records, which are presumably Associations. For the data set, I would like to be able ...
14
votes
1answer
273 views

How to create dataset with ordered and hierarchically-grouped rows?

The (toy-example) dataset plots consists of 12 rows, the first two of which are shown below: I want to arrange the plots shown in the ...
14
votes
1answer
115 views

Bug when combining Dataset with a scoping construct and Map

The following fails in v11: ...
14
votes
1answer
354 views

Dataset with more than 16 “columns”?

A Dataset with 16 columns or less is shown in a nice way: ...
14
votes
1answer
281 views

Dataset is 20X slow when adding column heads

I'm trying to use Dataset to explore some large data. I notice that the performance decrease more than 20X by adding heads to the columns. Here is an example: We ...
14
votes
1answer
376 views

Benefit of using Dataset to collect SQLSelect output

Considering a DatabaseExample included with Mathematica: ...
13
votes
3answers
370 views

Dataset collapsing/reducing

I have a dataset ds with 3 columns named A, B, C. Columns A and B have repeated values. How can I obtain another dataset that contains a list of the values in C for ...
13
votes
3answers
2k views

Transform Dataset so it can be used as training set for Classify

Trying to learn the new Dataset features, I am playing with the iris dataset: ...
13
votes
1answer
376 views

10.0.2 mapping Association to Dataset warning

Bug introduced in 10.0.2 and fixed in 10.0.3 In 10.0.2 ExampleData[{"Dataset", "Titanic"}][All, <| "gender" -> #sex|> &] Outputs the expected ...
13
votes
1answer
338 views

Streaming`LazyList`Testing may have a leak

Bug introduced in 10.2 and fixed in 10.3 Version 10.2; Win64 Enterprise. I'm seeing this message... data::shdw: Symbol data appears in multiple contexts {Streaming`LazyList`Testing`, Global`}; ...
13
votes
2answers
262 views

The equivalent of dplyr mutate with Dataset

In R, there is a package "dplyr" that works on data.frame objects, which is one of the origins of the Mathematica Dataset construct. One of the things dplyr can do is "mutate" the columns of a data....
13
votes
2answers
245 views

Is there a way to exert finer control Dataset Cell Coloration Like in Grid?

In Grid one can control the foreground and background color of specific cells, rows, and columns, whether initially or via computation. Although Dataset seems to use Grid intrinsically, from existing ...
12
votes
5answers
853 views

Applying a function to a Dataset column conditional on another slot's value

How to apply a function to a column conditional on another slot's value? The Dataset documentation show only how to apply a function to named slots independently. The ...
12
votes
5answers
2k views

Append a list as a column in a dataset

I have a Dataset and a List, called dataset and intervals, and I would like to append the list as a new column of the dataset. I ...
12
votes
4answers
529 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, ...
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 ...
12
votes
2answers
312 views

Query datasets with “variable” named slots

I want to query a Dataset object, e.g. select some entries using ...