Skip to content

Commit

Permalink
Update GraphExportToCSV_NC.py
Browse files Browse the repository at this point in the history
  • Loading branch information
wassimj committed Aug 18, 2022
1 parent 0aee023 commit e2499fb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions nodes/Topologic/GraphExportToCSV_NC.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,10 @@ def processItem(item):
edge_features = ""
edge_features_keys = Replication.flatten(edge_features_keys)
for edge_feature_key in edge_features_keys:
if edge_feature_key.strip(",;.") != '':
if len(edge_features) > 0:
edge_features = edge_features + ","+ str(round(float(DictionaryValueAtKey.processItem([ed, edge_feature_key])),5))
else:
edge_features = str(round(float(DictionaryValueAtKey.processItem([ed, edge_feature_key])),5))
if len(edge_features) > 0:
edge_features = edge_features + ","+ str(round(float(DictionaryValueAtKey.processItem([ed, edge_feature_key])),5))
else:
edge_features = str(round(float(DictionaryValueAtKey.processItem([ed, edge_feature_key])),5))
edge_feat.append(edge_features)
print("EDGE_GRAPH_ID",edge_graph_id)
data = [edge_graph_id, edge_src, edge_dst, edge_lab, edge_feat]
Expand Down

0 comments on commit e2499fb

Please sign in to comment.