Hi, trying to create a table of total occurrences of each cell value.
Here's an example of the csv input file:
Str, N1, N2, N3, N4, N5, N6
Sag, 15, 21, 23, 27, 36, 37
Sag, 8, 11, 13, 18, 25, 31
Sag, 1, 3, 7, 9, 15, 22
Sag, 7, 8, 25, 31, 32, 35
Sag, 3, 5, 8, 18, 19, 29
Sag, 2, 12, 14, 18, 22, 25
Sco, 3, 5, 16, 18, 21, 26
Sco, 6, 16, 23, 24, 30, 33
Sco, 9, 20, 25, 27, 34, 37
Sco, 16, 18, 20, 22, 24, 25
Sco, 8, 9, 13, 14, 27, 29
Sco, 2, 7, 9, 19, 24, 25
Sco, 4, 8, 13, 20, 27, 29
Sco, 6, 7, 11, 17, 22, 29
Sco, 11, 17, 19, 25, 27, 28
Sco, 4, 16, 23, 29, 35, 36
Lib, 7, 20, 21, 25, 35, 37
Lib, 8, 13, 14, 27, 30, 37
Lib, 1, 5, 15, 17, 23, 37
Lib, 6, 16, 21, 27, 28, 29
The 1st column - Str - has 12 possible values, I want 12 columns - 1 for each Str value. The cells in the table contain integers 1-37 in 6 cols - N1 - N6 - the output table should have 12 columns and 37 rows - 1 for each of the 37 integers in the cells, and each cell should contain a count of the integers for that row/column intersect.
So for the above input, output for column:
Sag
1. 1
2. 1
3. 2
4. 0
5. 1
6. 0
7. 2
8. 3
.
.
.
37. 1
Really appreciate any help
Thanks
David
Here's an example of the csv input file:
Str, N1, N2, N3, N4, N5, N6
Sag, 15, 21, 23, 27, 36, 37
Sag, 8, 11, 13, 18, 25, 31
Sag, 1, 3, 7, 9, 15, 22
Sag, 7, 8, 25, 31, 32, 35
Sag, 3, 5, 8, 18, 19, 29
Sag, 2, 12, 14, 18, 22, 25
Sco, 3, 5, 16, 18, 21, 26
Sco, 6, 16, 23, 24, 30, 33
Sco, 9, 20, 25, 27, 34, 37
Sco, 16, 18, 20, 22, 24, 25
Sco, 8, 9, 13, 14, 27, 29
Sco, 2, 7, 9, 19, 24, 25
Sco, 4, 8, 13, 20, 27, 29
Sco, 6, 7, 11, 17, 22, 29
Sco, 11, 17, 19, 25, 27, 28
Sco, 4, 16, 23, 29, 35, 36
Lib, 7, 20, 21, 25, 35, 37
Lib, 8, 13, 14, 27, 30, 37
Lib, 1, 5, 15, 17, 23, 37
Lib, 6, 16, 21, 27, 28, 29
The 1st column - Str - has 12 possible values, I want 12 columns - 1 for each Str value. The cells in the table contain integers 1-37 in 6 cols - N1 - N6 - the output table should have 12 columns and 37 rows - 1 for each of the 37 integers in the cells, and each cell should contain a count of the integers for that row/column intersect.
So for the above input, output for column:
Sag
1. 1
2. 1
3. 2
4. 0
5. 1
6. 0
7. 2
8. 3
.
.
.
37. 1
Really appreciate any help
Thanks
David