Group Abstract Group Abstract

Message Boards Message Boards

0
|
120 Views
|
4 Replies
|
7 Total Likes
View groups...
Share
Share this post:

Is there an easy way to add columns to data created with Tabular?

Is there an easy way to join the following tables, tab1 and tab2. Where:

tab1 = Tabular[ 
  {    {"001", 1, 2, 3}, {"002", 4, 5, 6}, {"003", 7, 6, 7}, {"004", 
    8, 9, 10}, {"005", 8, 9, 10} },
   {"ID", "num 1", "num 2", "num 3"}  ];

tab2 = Tabular[ 
  {    {"001", 0.1, 0.3}, {"002", 0.99, 0.1}, {"003", 1.01, 
    1.67}, {"005", 0.4, 0.3} },
   {"ID", "num 4", "num 5"} ]

tab2 has additional columns for the elements in tab1. Also, tab2 does not have exactly the same elements as tab1.

Attachments:
4 Replies

I only have this:

You can experiment for free on Wolfram Cloud ,you must only sign in.

In new version of Mathematica 14.3 added new features like ColumnwiseCombine. Regards M.I.

POSTED BY: Mariusz Iwaniuk

Wonderful Mariusz!! Thank you very much.

An easier way to generate the Dataset.

ds1 = FromTabular[tab1, "Dataset"]

POSTED BY: Rohit Namjoshi

Thank you very much Rohit

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard