File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -297,7 +297,7 @@ def __init__(
297297 if ext == "csv" :
298298 data = pd .read_csv (os .path .join (tgtdir , "synthetic_data.csv" ), index_col = 0 )
299299 elif ext in ("tab" , "tsv" ):
300- data = pd .read_csv (os .path .join (tgtdir , "synthetic_data.tab" ), sep = "\t " )
300+ data = pd .read_csv (os .path .join (tgtdir , "synthetic_data.tab" ), sep = "\t " , index_col = 0 )
301301 elif ext == "parquet" :
302302 data = pd .read_parquet (os .path .join (tgtdir , "synthetic_data.parquet" ))
303303 else :
@@ -337,7 +337,7 @@ def __init__(
337337 graph .add_nodes_from (coords .index )
338338 graph .add_edges_from (edges .values )
339339
340- node2id = {n : i for i , n in enumerate (graph . nodes )}
340+ node2id = {n : i for i , n in enumerate (data . index )}
341341 self .edge_list = [(node2id [e [0 ]], node2id [e [1 ]]) for e in graph .edges ]
342342 self .graph = nx .from_edgelist (self .edge_list )
343343
You can’t perform that action at this time.
0 commit comments