I have a dataframe as below:
and would like to create a network where nodes are from the con.taxonomy and res.taxonomy columns, the edges being created via geographic.location. I have managed to create the network, as follows:
G = nx.from_pandas_edgelist(swiz_lakes, "con.taxonomy", "res.taxonomy", "geographic.location")
however, I was wondering whether it was possible to add other attributes to the nodes, as it is possible to do via the edges. E.g. I could have
G = nx.from_pandas_edgelist(swiss_lakes, "con.taxonomy", "res.taxonomy", ["geographic.location", "con.metabolic.type", "con.movement.type", "res.metabolic.type", "res.movement.type"])
I want to know if something similar can be done so as to store further information in the nodes, but not as labels.
Is this possible, or if not, please could somebody explain why not?
