Browse Source

rename variables in graph

master
nitowa 2 years ago
parent
commit
562a281ce4
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/spark/main_graphs.py

+ 2
- 2
src/spark/main_graphs.py View File

49
 
49
 
50
 tx_df = master.get_tx_dataframe()
50
 tx_df = master.get_tx_dataframe()
51
 
51
 
52
-transaction_as_vertices =  tx_df \
52
+addresses_as_vertices =  tx_df \
53
     .select('address') \
53
     .select('address') \
54
     .withColumnRenamed('address', 'id') \
54
     .withColumnRenamed('address', 'id') \
55
     .distinct()
55
     .distinct()
65
     .flatMap(explode_row) \
65
     .flatMap(explode_row) \
66
     .toDF(['src', 'dst'])
66
     .toDF(['src', 'dst'])
67
 
67
 
68
-g = GraphFrame(transaction_as_vertices, transactions_as_edges)
68
+g = GraphFrame(addresses_as_vertices, transactions_as_edges)
69
 components = g.connectedComponents(algorithm='graphframes')
69
 components = g.connectedComponents(algorithm='graphframes')
70
 
70
 
71
 master.write_connected_components_as_clusters(components)
71
 master.write_connected_components_as_clusters(components)

Loading…
Cancel
Save