Here's my problem: each employee is uniquely identified by an id (e. g. KCUTD_41) I have already created a dictionary from a file to gather each company with the employee id and that looks like this:
{ 'Company 1' :['KCUTD_41',
'KCTYU_48',
'VTSYC_48',
......]
'Company 2' :['PORUH_21',
'PUSHB_10',
....... ]
'Company 3' :['STEYRU_69']}
In total I have several companies.
In parallel in another file, I have several lines where each line corresponds to a collaboration group between companies with several employees and doctoral students (d215485 etc.....)
The file looks like this:
PORUH_21 d215487 d215489 d213654 KCTYU_48 d154225 ...
d25548 d89852 VTSYC_48 d254548 d121154 d258774 PUSHB_10 ...
etc ....
What I want is the number of employees and the number of groups (line where it appears) to get something like that
OUTPUT:
Company 1 : (number of employees from company 1 per line ) : number of groups or line where it appears in total
Company 2 : (number of employees per line from company2) : nb of groups or line where the employees from company2 appears in total
Company 3 : ......
I wanted to use a condition in order to see if the values for each keys from my dictionary matches and if yes count the number of occurrences
I hope it's better now ^^'
If you can help me ^^