Skip to main content
added 191 characters in body
Source Link
MHS
  • 3
  • 2

Let's say I have a table in Mathematica like so: Table

Where the first row is the header, and first column is also a header (similar to a multiplication table). ie S_AS_A = Es; S_BS_A = ss_sigma;

The layout for this list is like so:

{
{
{header row},
{"row name1",row item 1, row item 2, etc...}
{"row name 2", row item 1, row item 2, etc...}
}
}

How do I flatten this table into an association thread like so: Desired list

Let's say I have a table in Mathematica like so: Table

Where the first row is the header, and first column is also a header (similar to a multiplication table). ie S_AS_A = Es; S_BS_A = ss_sigma;

How do I flatten this table into an association thread like so: Desired list

Let's say I have a table in Mathematica like so: Table

Where the first row is the header, and first column is also a header (similar to a multiplication table). ie S_AS_A = Es; S_BS_A = ss_sigma;

The layout for this list is like so:

{
{
{header row},
{"row name1",row item 1, row item 2, etc...}
{"row name 2", row item 1, row item 2, etc...}
}
}

How do I flatten this table into an association thread like so: Desired list

added 15 characters in body; edited tags; edited title
Source Link
MHS
  • 3
  • 2

Flatten table into list so thatAssociation Thread where each cell is a rulean association from its column and row header

Let's say I have a table in Mathematica like so: Table

Where the first row is the header, and first column is also a header (similar to a multiplication table). ie S_AS_A = Es; S_BS_A = ss_sigma;

How do I flatten this table into a listan association thread like so: Desired list

Flatten table into list so that each cell is a rule

Let's say I have a table in Mathematica like so: Table

Where the first row is the header, and first column is also a header (similar to a multiplication table). ie S_AS_A = Es; S_BS_A = ss_sigma;

How do I flatten this table into a list like so: Desired list

Flatten table into Association Thread where each cell is an association from its column and row header

Let's say I have a table in Mathematica like so: Table

Where the first row is the header, and first column is also a header (similar to a multiplication table). ie S_AS_A = Es; S_BS_A = ss_sigma;

How do I flatten this table into an association thread like so: Desired list

Source Link
MHS
  • 3
  • 2

Flatten table into list so that each cell is a rule

Let's say I have a table in Mathematica like so: Table

Where the first row is the header, and first column is also a header (similar to a multiplication table). ie S_AS_A = Es; S_BS_A = ss_sigma;

How do I flatten this table into a list like so: Desired list