Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [associations]

Questions on the associative data-structure introduced in Mathematica version 10.

37 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
13
votes
0answers
271 views

Slow JoinAcross performance

Bug introduced in 10.3 I am using JoinAcross to combine two datasets, where the key is an Integer. ...
12
votes
0answers
170 views

Unix-like reference to parent and root Association?

Is there a syntax or function to reference parent and root when querying nested Associations similar to Unix' ".." and "/", eg "cd ../../mydir". ? Here's a typical application of the root construct....
10
votes
0answers
773 views

Dataset in Mathematica 10.0.1

Wolfram pages "Mathematica Quick Revision History" in Mathematica 10.0.1 release says: "New operators and compositions of operators enabled for associations functions such as Dataset and Query" ...
9
votes
0answers
145 views

Strange result of DeleteCases in an association

Bug introduced in 10.1.0 and fixed in 10.3.1 The function DeleteCases can be used for associations, also with level specification. Here is an example where some ...
8
votes
0answers
145 views

KeyValuePattern specificity in DownValues

Bug introduced in 10.4.0 and persisting through 11.3.0 CASE:3824590 [...] Developers are discussing this behavior. [...] I will let you know when I have definite information on this. [...] ...
8
votes
0answers
132 views

Relation between the syntactic and evaluated Association

This question is inspired by this answer and related to unsolved post "Association's Attributes change between 10.3.1 & 10.4"...
7
votes
0answers
69 views

Substitute for Association inside Compile?

Associations are not compilable, so I’m looking for a workaround to this. That is, I need a mutable hashtable-like data structure with fast key value lookups ...
7
votes
0answers
59 views

Unwanted evaluation of RHS of association in FilterRules

FilterRules is a handy function that works on associations, however it does not respect delayed association-values. RuleDelayed ...
5
votes
0answers
250 views

Why is Transpose Dataset slow in one direction

Transpose is faster when it distributes Keys at the 2nd level of a Dataset than when it factors them out. ...
4
votes
0answers
192 views

Extract a key from an Association?

I have some large nested expression containing associations and I'd like to extract the nth key inside one of them, using part syntax. Here's a tiny example: ...
4
votes
0answers
88 views

How to get parent key in Query on Association/Dataset?

Is there a general and terse method to obtain the parent key of the current "position" in a Query of an Association/...
4
votes
0answers
85 views

Given a list, find Association from index to value

I have a list list = {"a","b","c",…} and I want the association <| 1 -> "a", 2 -> "b", 3 -> "c", … |> This ...
4
votes
0answers
147 views

TimelinePlot with Interval in Associations

Bug introduced in 10.2 and fixed in 10.3.0 This is related to a previous question I asked about TimelinePlot and multiple associations (Behavior of TimelinePlot ...
4
votes
0answers
74 views

Wrong autogenerated package from notebook containing #key and Part as subscript

Bug introduced in 10.0.0 and persisting through 10.1.0 or later Mathematica v10.1.0, under Windows 8.1 x64 Mathematica v10.0.2, under Windows 1) Define a function in an initialization cell: ...
4
votes
0answers
123 views

Functional-Style Fixed-Length Queue Object?

Following up on question Side-effecting an array in an association? and @Mr.Wizard's answer in there, I'm modernizing and tweaking Daniel Lichtblau's efficient queues and ran into a little roadblock. ...
3
votes
0answers
41 views

Missing values vanish from expressions with DateObject and slot-lookup?

Missing value vanishes when adding or subtracting DateObject but only when slot-lookup is used, in an Association query: Given ...
3
votes
0answers
139 views

Does Mathematica support out-of-core Associations?

I often find myself collecting data in an Association[] which outgrows my computer's main memory. Does Mathematica support any out-of-core equivalent? Ideally, I ...
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: ...
2
votes
0answers
31 views

Keyed eigensystem for nested Association

Suppose a matrix is given where both rows and columns are keyed, for example this correlation matrix: ...
2
votes
0answers
55 views

Create Association from Expression

I have a set of algebraic expressions of a certain form, and I would like to make them into Associations in a specified way. My expressions are formed of two heads, ...
2
votes
0answers
117 views

`Transpose` nested `Association`

Say I have a nested Association like this one: ...
2
votes
0answers
73 views

Problems using KeySelect for associations

I'm quite new at mathematica so hopefully this is fairly simple. I am trying to make a snowflake using a hexagonal grid. I have a list of co-ordinates pnts that ...
2
votes
0answers
94 views

List, Association, and Dataset, according to what principles to choose which one to use?

List, Association and Dataset are three 'objects' that can be used to store data in MMA. So ...
2
votes
0answers
111 views

How to convert a notebook to an association and back?

I have a notebook that serves as a nice readable document but is it a database of sorts, I'd like to transform this into an association so I can manipulate and export it as a dataset. Here is a sample ...
2
votes
0answers
94 views

Adding an unused column creates an error in JoinAcross

I'd been having trouble using JoinAcross on two datasets. After going through the answers to my original question and fixing my code, I find I'm now having a ...
1
vote
0answers
49 views

Wrapping an association with a specialization of the buildin `Set` (=) function?

I want to wrap some association data into a dedicated symbol (S by example) ...
1
vote
0answers
44 views

Extracting Parts of Speech

I am looking to parse the ConstituentsTree from TextStructure. Someone already asked how to get the proper nouns out of a text here: Extract names from a document I am looking for a more general ...
1
vote
0answers
62 views

Variance of list of associations

Bug introduced in 10.4 and fixed in 11.1 Mean can calculate the mean of a list of associations: ...
1
vote
0answers
43 views

Create an association from a string in unknown format (it's like JSON?)

I am trying to parse a string. The string is similar with JSON, but it's not JSON, I don't know the format name of the string, so I have to parse it manually but not to use Import. Is there any ...
1
vote
0answers
175 views

Matching key-value pair without converting to List in KeyValueMap

I frequently use this method with KeyValueMap in order to match and refer to named parts (ie, "myKey", "myValue") EDIT: to refer to named parts in the function <...
1
vote
0answers
203 views

Speed up replacement using Rule Dispatch Associtation

I knew that this has asked many times, but I hope there is something more could be done to speed this up. The expression kappa is here. ...
1
vote
0answers
108 views

Parallel assigning to an Association

This is a simplified example of a problem I ran into. I want to count how often a subkernel executes a given computation. So, after having launched the subkernels, I construct an association with ...
1
vote
0answers
98 views

Bug? Side effects when exporting to .mx

I seem to have encountered a bug when exporting to .mx, at least on OS X. Can anyone reproduce this? I am on MMA 10, OS X 10.9.4. ...
0
votes
0answers
26 views

Having trouble distributing a large association to sub-kernels

The following seems to work based on memory usage. ...
0
votes
0answers
104 views

Export & Import Association with Lists and Rationals without ExpressionJSON

Consider following association: ...
0
votes
0answers
248 views

How to change a key's value of association?

I want to write a pure function to change the key's value of an association, it must return the new association, so it can be mapped to a table of associations. The AssociateTo can change key's value ...
0
votes
0answers
79 views

Key mapping an association applied to a distribution

I am attempting to import data from a database, group it according to a given identification parameter, get it's statistically relevant information, and then export it as a JSON object for ...