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
1
vote
1answer
94 views

separating a `ReadList` of a CSV file into columns using `Case`

I have a really large file and would like to determine the pattern required for separating the columns by the different headers. I attempted to use Cases but it's ...
12
votes
5answers
314 views

Best way to convert numerical columns of a dataset with missing values into a matrix

What is the best way (simplest, fastest) to convert the numerical columns of a dataset into a matrix? The numerical columns can have missing values. For example for this dataset: ...
2
votes
0answers
135 views

`Transpose` nested `Association`

Say I have a nested Association like this one: ...
1
vote
0answers
59 views

How to: `GeneralizedLinearModelFit` with `Dataset` with cofactors

Please do not think of this question as a more general extension of LinearModelFit with Dataset asked by @alan, and answered by @Weach. The original question (or at least the solution) pertained more ...
3
votes
3answers
240 views

How to ListPlot two datasets on the same graph?

Consider the following dataset: keys = {"a", "b", "c", "d"}; vals = Partition[Range[20], 5] ds = Dataset[AssociationThread[keys, #] & /@ Transpose@vals] In ...
2
votes
3answers
176 views

Conditional selection of rows from a dataset

How can one select rows "a" and "b" from the following dataset where "b" values are larger ...
3
votes
1answer
72 views

Dataset column stubs in query result

Suppose I have a dataset with a header row. ds = Dataset[AssociationThread[{"x", "y", "z"}, #] & /@ RandomReal[{0, 1}, {10, 3}]]; I want to construct the ...
3
votes
3answers
143 views

aggregate records across dates

Each record in a dataset includes a country name, a year, and observations (e.g., GDP) for that country in that year. I would like to generate a new dataset with one record per country (so I would ...
1
vote
1answer
101 views

Take data point from Circle

I would like to draw a circle within triangle. In this case, I make it from 3 points. then I followed program below: ...
9
votes
4answers
208 views

Dataset query for keys of upper levels

Say I have a Dataset like this: dat=Dataset[<|"a" -> 2, "b" -> "y", "c" -> {2, 3}|>] I want to get the keys of upper levels as elements in the ...
0
votes
1answer
221 views

How to create and implement a small database on Mathematica?

I have a function f[x_,y_,z_]:= a^x b^y c^z and I want to evaluate it for various values of x,y,z always coming in triples. This means I have a database with ...
6
votes
1answer
140 views

General question about data management

I am curating a small number of databases-actually I am not sure if they qualify as such; they are more like collections of-loosely-related data points; the problem is that they are growing over time; ...
7
votes
2answers
221 views

Map Values in 'nested' association

JSON often returns sort of 'nested' associations like so: ...
6
votes
1answer
269 views

How to filter this nested list of Association

For example, I have the following data ...
2
votes
1answer
96 views

Percentage of keys that match a criteria in a dataset [duplicate]

I have dataset designed around a whiskey tasting. I have 25 tasters who have submitted scores on about 20 whiskeys. Here is a sample of how I structured the data in Mathematica: ...
0
votes
1answer
74 views

Find out how closely the model fits the data

I have an interpolating function pfun[t] and a data set in the form of {{t,f}} what can I do to get a numeric estimate on ...
2
votes
2answers
185 views

PlotMarkers not differently colored when Joined->True, InterpolationOrder and Mesh->True in ListPlot?

I have some data I need to plot smoothly. I am using ListPlot and Joined; to make them smooth, I found I need to use InterpolationOrder->3; then, to have only markers on the data set, I am using Mesh->...
1
vote
0answers
50 views

Error when selecting row and column with Dataset[]

I read in my data using: dat=Dataset[Import["dat.csv"]] When I view the data it appears correct. However, when I execute a command like ...
4
votes
1answer
78 views

How to display a True/False table [closed]

Below is my written program ...
6
votes
2answers
522 views

Why this syntax for renaming columns in datasets?

Form the documentation of Dataset: ...
6
votes
4answers
236 views

GroupBy dataset values and length

I have a dataset, and I want to group by one of my columns, and then show the Length of another set of columns for each group. For example: ...
1
vote
1answer
114 views

How to use GroupBy in Dataset when the key is not string

If the key is string, this code is working ...
5
votes
1answer
160 views

Dataset: best practices for unordered hierarchical data

Note: the editor warns that this is a "subjective" post, but I am looking for an objective answer (e.g. in relation to easy of use of the many built-in functions, speed, etc). Suppose you have a ...
2
votes
2answers
106 views

Dataset: dynamically selecting all rows of with the nth element of a column

Suppose you have a dataset with the following layout: ...
3
votes
0answers
121 views

Adjusting opacity in map overlays

I am currently working with rainfall data from hurricane Harvey in order to better understand how to allocate resources in the event of another disaster. I want to accomplish a few things given this ...
4
votes
0answers
82 views

Scrolling Dataset with down arrow hangs its display

Update : same in v 11.3.0 (OSX) (so bad, it just froze completly the Front End and I had to kill by hand ... and I lost some work !!! Be careful) It's rather an annoying problem i've got many times ...
2
votes
1answer
70 views

TakeLargestBy nested variable in Dataset

I would like to TakeLargestBy a nested variable in a Dataset. To be clearer, here is code to make an example dataset ...
1
vote
4answers
518 views

ListPlot of two columns of a Dataset with respect to one another

Say I have some data in two columns of a set called table which are labelled C1 and C2, I can do the following: ...
5
votes
1answer
504 views

Selecting rows in a Dataset

I'm struggling to get certain rows from a Dataset. Here's the set: plateData = ResourceData["Large Global Plate Boundaries"] I'd like to do something like this, ...
2
votes
0answers
82 views

THISCONTEXTDOESNOTEXIST123 [closed]

I was playing with my Qwant API connection today and I hit this: The headings on the dataset give me that beautiful error message. Anyone have any idea what could have caused it? This might be too ...
6
votes
4answers
601 views

Selecting data from multiple columns

Mathematica has almost the following example in the documentation: ...
1
vote
1answer
73 views

MaximalBy in case of missing column entries

I have a large dataset, resulting from a JoinAcross operation, which looks similar like this one (only more complicated) ...
2
votes
4answers
162 views

Import two variable data from excel

I'm quite new to Mathematica. I've been looking for the information but couldn't find it. I have several sets of data corresponding to the exposure of photographic paper. On the first row I have the ...
4
votes
1answer
87 views

Replacing “Unmatched” with value

I have two datasets ...
1
vote
2answers
157 views

Exporting dataset with NumberForm

I have a dataset which includes strings and numbers. I want to export it in CSV with all numbers being printed with 2 decimals. I tried several functions like mydataset=NumberForm[#, {Infinity, 2}...
9
votes
1answer
202 views

Dataset - append row with a value which depends on two other rows

I have go through the forum but did not see this question. Hope I don't miss it. I want to add a new colum "C" to a dataset with existing columns named "A" and "B". The value of "C" shall be the ...
1
vote
1answer
93 views

Neat way to make Dataset from RecurrenceTable

I just learned that I can create a Dataset by combining Dataset and Table functions. For example: ...
4
votes
1answer
153 views

Combine datasets with partially different columns row-wise

I have a problem, which I assume to be trivial, but can't solve it: I have two datasets, ...
7
votes
1answer
362 views

Export of (large) Dataset lasts very long

I have a Dataset (non numerical data) which has a ByteCount of about 14GB, When I export it to disc (SSD) the resulting ".m" or "...
0
votes
2answers
407 views

How can I turn the first column in a dataset into row names?

I've used SemanticImport to import to a "TSV" spreadsheet into a Dataset. Each row starts ...
2
votes
1answer
126 views

Problem understanding Datasets with keys that are not strings

I am having difficulty understanding the difference between Dataset with strings as keys versus using symbols as keys. Below is a very simple toy dataset (my ...
8
votes
1answer
134 views

Adding metadata to non-atomic expressions in Associations and Dataset

Information and Attributes require arguments to be symbols and strings , whether built in or user-defined. there's often the ...
0
votes
0answers
105 views

Datelistplot and datasets. Plotting several time series with mapping functions and adding options

Following the post How do I plot multiple time series from a Dataset?, I have additional questions. I have a dataset with four columns. First is the date. 2nd to 4th are values (v1,v2 and v3). ...
5
votes
2answers
774 views

Change value in a Dataset

I could not find an answer on this fundamental question, even though I was reading the references on Dataset and Association and ...
0
votes
2answers
183 views

How to deal with dataset with missing items?

I collect some data with missing items. data = Dataset[{<|"a" -> 1, "b" -> 2|>, <|"a" -> 11|>}]; It's not right to do ...
0
votes
1answer
39 views

Is there a way to use CellPrint on dataset objects?

I am trying to assign a cell tag onto my cell with contents in the form of a dataset. However, I am receiving the following error: The wrong number of arguments (12) was given to a box ("BoxData") ...
9
votes
1answer
112 views

Export[…, “tsv”] drops minus signs from Dataset [horrific bug?]

Toy example: First, create a Dataset: ...
3
votes
1answer
118 views

Query from Association of Associations Dataset

I have a rather large dataset comprised of Association of Associations. For better or worse, I've converted this into a Dataset. Here is a simplified version of ...
0
votes
1answer
253 views

Correct format to import vector from file

Although this question was kind of already asked, it was closed because not enough information was given. Here is my attempt. I am trying to find out the correct format to import a vector data set (...
1
vote
1answer
68 views

Syntax for transforming column in a dataset [closed]

Suppose I have a dataset a, featuring a column labeled n, whose values are all string representations of integer values. I want ...

1 2 3
4
5
11