I have the following dataframe:
data = [['tom', 'matt','alex',10,1,'a'], ['adam', 'matt','james',15,1,'a'],['tom', 'adam','alex',20,1,'a'],['alex', 'matt','james',12,1,'a']]
# Create the pandas DataFrame
df = pd.DataFrame(data, columns = ['Person1','Person2','Person3', 'Attempts','Score','Category'])
print(df)
Person1 Person2 Person3 Attempts Score Category
0 tom matt alex 10 1 a
1 adam matt james 15 1 a
2 tom adam alex 20 1 a
3 alex matt james 12 1 a
I am hoping to create a network graph where:
a) there is a node for each unique person across Person1, Person2, Person3
b)
the nodesize is the sum of Attempts for each person
c) there is a edge between each person where they share an Attempts and the thickness is the sum of `Attempts they share.
I have read through the documentation but still struggling to find out how to setup my dataframe and then to plot. Any ideas on how to do this? Thanks very much!
