My data looks like this:
departusers =
'Department A' [1] 'Department A' [1] 'Department A' [0] 'Department A' [0] 'Department B' [0] 'Department B' [1] 'Department B' [0] 'Department B' [0] 'Department C' [1] 'Department C' [0] 'Department C' [0] 'Department C' [0]
0 = Users with access to the system, which I define A
1 = Users who have used the system, which I define B
The output I need is:
Department A
A = 4
B = 2
Department B
A = 4
B = 1
Ect. It's important that the specific department name is saved with the final results.
I tried with a combination with a while and if statements, but I am having a hard time with adding up the numbers corresponding to the string names.
Best Answer