Adjazenzmatrix mit Stringknoten in PythonPython

Python-Programme
Guest
 Adjazenzmatrix mit Stringknoten in Python

Post by Guest »

Ich habe eine CSV-Datei mit Knoten und eine CSV-Datei mit Kanten – alle Knoten sind STRING.
Ich brauche bitte Hilfe, wie kann ich eine Adjazenzmatrix dieses Diagramms in Python erstellen?Beispiel für die Daten:

Code: Select all

Nodes csv:
a
b
c
d

Edges csv:
a,b
b,c
a,c
d,a
b,d

I want it to be presented as an adjacency matrix:
a  b  c  d
a 0  1  1  1
b 1  0  1  1
c 1  1  0  0
d 1  1  0  0
Vielen Dank!

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post