Using Python 3.2 I am trying to turn data from a CSV file into a two-mode network. For those who do not know what that means, the idea is simple:
This is a snippet of my dataset:
Project_ID    Name_1    Name_2    Name_3    Name_4 ... Name_150
    1           Jean      Mike
    2           Mike
    3           Joe       Sarah     Mike      Jean        Nick
    4           Sarah     Mike
    5           Sarah     Jean      Mike      Joe
I want to create a CSV that puts the Project_IDs across the first row of the CSV and each unique name down the first column (with cell A1 blank) and then a 1 in the i,j cell if that person worked on a given project. NOTE: My data has full names (with middle initial), with no two people having the same name so there will not be any duplicates.
The final data output would look like this:
            1             2              3              4              5 
Jean        1             0              1              0              1
Mike        1             1              1              1              1
Joe         0             0              1              0              1
Sarah       0             0              1              1              1
...        ...           ...            ...            ...            ...
Nick        0             0              1              0              0
 
     
    