I'm a beginner in Mathematica, so this may be a simple request. I have generated some columns of names and data. I want to merge them into a single list of names, with a column for each attribute.
However, not all names are in each list, and I have had some problems ordering by the "Name" column.
Here are the lists
{
{"Name", "Friend BC"},
{"Bru-2", 25.1333},
{"Al-1", 34.5667},
{"Dave-4", 0.},
{"Hal-8", 1.33333},
{"Leo-12", 7.06667},
{"Pat-16", 1.33333},
{"Ned-14", 1.18333},
{"Chas-3", 4.83333},
{"Sam-19", 1.18333},
{"Ed-5", 61.6667},
{"Ian-9", 4.2},
{"Ken-11", 1.7},
{"Quinn-17", 0.733333},
{"Unwin-21", 0.733333},
{"Frank-6", 33.1333},
{"Gra-7", 0.},
{"Jo-10", 44.2833},
{"Tom-20", 0.},
{"Mal-13", 0.},
{"Ollie-15", 35.9167}
}
{
{"Name", "Advice BC"},
{"Sam-19", 0.},
{"Mal-13", 0.},
{"Leo-12", 0.},
{"Ian-9", 0.},
{"Pat-16", 0.},
{"Dave-4", 0.},
{"Tom-20", 0.0769231},
{"Quinn-17", 0.0769231},
{"Ned-14", 0.0769231},
{"Ken-11", 0.0769231},
{"Jo-10", 0.0769231},
{"Gra-7", 0.0769231},
{"Frank-6", 0.0769231},
{"Unwin-21", 0.0769231},
{"Ron-18", 0.0769231},
{"Hal-8", 0.0769231},
{"Bru-2", 0.0769231},
{"Al-1", 5.74359},
{"Ed-5", 38.5},
{"Chas-3", 38.5},
{"Ollie-15", 70.4103}
}
I want the final table to be
{
{"Name", "Advice BC","Friend BC"},
{"Sam-19", 0., 1.18333},
{"Mal-13", 0., 0.},
{"Leo-12", 0., 7.06667},
{"Ian-9", 0., 4.2},
{"Pat-16", 0., 1.3333},
{"Dave-4", 0., 0.},
{"Tom-20", 0.0769231, 0.},
{"Quinn-17", 0.0769231, 0.73333},
{"Ned-14", 0.0769231, 1.18333},
{"Ken-11", 0.0769231, 1.7},
{"Jo-10", 0.0769231, 44.2833},
{"Gra-7", 0.0769231, 0.},
{"Frank-6", 0.0769231, 33.1333},
{"Unwin-21", 0.0769231, 0.73333},
{"Ron-18", 0.0769231, 0.},
{"Hal-8", 0.0769231, 1.3333},
{"Bru-2", 0.0769231, 25.1333},
{"Al-1", 5.74359, 34.5667},
{"Ed-5", 38.5, 61.6667},
{"Chas-3", 38.5, 4.8333},
{"Ollie-15", 70.4103, 35.9167},
{"Sam-19", 0., NULL}
}
Any ideas? I can't seem to find any solutions already out there.
Also, how can I sort by the first column alphabetically?
0.andNull, but each input table has a value for "Sam-19" is that correct? – image_doctor Sep 24 '12 at 9:56