40 votes

User interface Mathematica 12.1 terribly slow

Official Statement In case some of you missed it: There was an official reply from one of the WRI devs recently in our chat Hi. This is Jose, from Wolfram. We are aware of an unacceptable slowdown ...
halirutan's user avatar
  • 113k
28 votes
Accepted

Assign names to Dataset columns

data = N @ Normalize[#, Total] & @ Counts @ Characters @ ExampleData[ {"Text", "DeclarationOfIndependence"} ]; Dataset @ data ...
Kuba's user avatar
  • 137k
27 votes

User interface Mathematica 12.1 terribly slow

Dataset was restructured in the 12.1 release in order to support expanded formatting options and interactivity such as hiding and sorting. As a result, some Dataset outputs showed a slowdown due to ...
jose's user avatar
  • 6,348
24 votes
Accepted

Query: adding additional operator changes meaning of preceding operators

This is a corner case that occurs when ascending operators are interleaved between descending operators. This case falls into an undocumented grey area. In the Details and Options section of the ...
WReach's user avatar
  • 68.9k
24 votes

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

One simple way of "filtering" your data is to treat the points as a graph, and search for the shortest path from left to right: ...
Niki Estner's user avatar
  • 36.1k
21 votes

Error changing Dataset using Part

I have implemented the underlying kernel functionality that is needed to make this possible. However it is not yet implemented on the Dataset side. I don't think this will happen in the immediate ...
Taliesin Beynon's user avatar
21 votes

Assign names to Dataset columns

Actully we have a easiest way,suppose you have dataset like ...
yode's user avatar
  • 26.7k
18 votes
Accepted

How to work with a Dataset?

There are two issues under discussion: 1) the distinct dataset visualizations for the same data and 2) ways to update dataset subelements in place. We will discuss these separately. Distinct Dataset ...
WReach's user avatar
  • 68.9k
18 votes
Accepted

Delete column from a dataset in mathematica

You can use KeyDrop: ...
kglr's user avatar
  • 395k
16 votes
Accepted

How to construct a dataset with lists as columns

Let's take some example lists: lis1 = {1, 2, 3, 4, 5}; lis2 = {6, 7, 8, 9, 0}; lis3 = {2, 4, 6, 8, 9}; Now you can combine your lists into one list and your ...
RunnyKine's user avatar
  • 33.1k
16 votes
Accepted

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

Update - Version 11 In version 11, The Dataset visualizer handles triply-nested associations quite nicely: ...
WReach's user avatar
  • 68.9k
16 votes

Mathematica values new list

There are many ways to do this, but my favorite is to use the the stride and end arguments in Drop: ...
Pillsy's user avatar
  • 18.5k
16 votes
Accepted

Select data from a structured list

Maybe there is something more elegant, but there you go: Cases[data, {n_Integer} | {_?(LessThan[2]), b__} :> {n, b}]
Najib Idrissi's user avatar
15 votes
Accepted

How to make datasets display correctly?

The reason for the difference between ugly and nice is in the (hidden) data type that Dataset...
Stefan R's user avatar
  • 2,136
15 votes
Accepted

Using Select on Dataset with missing keys

You can use the Slot function rather than #slot. This is nearly as fast as the #slot implementation, but doesn't cause this issue. ...
Carl Lange's user avatar
  • 13.1k
14 votes
Accepted

Append a list as a column in a dataset

One way: ds // Transpose // Append["intervals" -> intervals] // Transpose In Mathematica it is usually easier to operate on rows, which is what this solution ...
C. E.'s user avatar
  • 70.6k
14 votes
Accepted

Transpose fail in 11.1 Dataset

As observed in the question, the problem lies with the type information of the dataset. Specifically, the type information for the innermost association is missing (i.e. "any type"). This causes the ...
WReach's user avatar
  • 68.9k
14 votes
Accepted

Export of (large) Dataset lasts very long

Answer It seems that DumpSave is the fastest, based on my test below. Albert Retey offers a very relevant comment to this answer, which I think deserves to be ...
rhermans's user avatar
  • 36.5k
14 votes

Select data from a structured list

SequenceReplace[{ a : {_, _, _, _} ...} :> Sequence @@ (Rest /@ Select[First@# <= 2 &]@{a})] @ data {{1}, {-12.7758, -0.00980164, 0.00032368}, {-12....
kglr's user avatar
  • 395k
13 votes

Creating a Stock Dataset

Dataset has been designed for hierarchical data and will fit your problem well. You should start by mapping out the hierarchy and then building a function that ...
Edmund's user avatar
  • 42.3k
13 votes

Append a list as a column in a dataset

Another way: ds[MapThread[Append[#1, "intervals" -> #2] &, {#, intervals}] &]
swish's user avatar
  • 7,891
13 votes

How to read .npy file in Mathematica?

I would suggest reading it with numpy and not Mathematica. It seems to me that this is not an exchange format. It is a format meant to be used only by numpy. Mathematica 12.0 has significantly ...
Szabolcs's user avatar
  • 235k
13 votes

Dataset function and related gadgets not ideal for large datasets

Why would you limit yourself to Database-like operations as J. M. nicely put it, when you can have true out-of-core SQL? In version 12 we have introduced integration of SQL-backed databases into the ...
Carlo's user avatar
  • 1,171
13 votes
Accepted

Importing a Wikipedia Table as a Dataset?

After some mental hemming and hawing, I decided it'd be good to have a proper answer about importing HTML tables using something other than the often buggy "Data" ...
b3m2a1's user avatar
  • 46.9k
13 votes
Accepted

Dataset Association of Association vs Hierarchical data

To obtain a tabular rendering for a dataset, all rows must have the same number of columns, with the same set of keys, in the same order. But in our case the last association has fewer elements than ...
WReach's user avatar
  • 68.9k
12 votes
Accepted

Create a new dataset column based on the row key

After some fiddling, I have discovered that MapIndexed works for associations and came up with this solution: ...
Andrei's user avatar
  • 351
12 votes

Append a list as a column in a dataset

Suppose your column is a list of Association objects or a Dataset: ...
Carl Woll's user avatar
  • 131k
12 votes
Accepted

Map Values in 'nested' association

I have failed to find a good duplicate so: assoc // Query[All, {"a" -> f}] or MapAt[f, assoc, {All, "a"}]
Kuba's user avatar
  • 137k
12 votes
Accepted

How to merge dataset rows conditionally?

...
kglr's user avatar
  • 395k

Only top scored, non community-wiki answers of a minimum length are eligible