Apache Spark, Graphx, Graph Processing, Data Science, Data Analysis.
number of vertices and edges num_vertices = graph.numVertices() num_edges = graph.numEdges() # Access vertex and edge attributes vertices_df = graph.vertices.toDF() edges_df = graph.edges.toDF() # Filtering vertices and edges filtered_vertices = graph.vertices.filter("id > 1") filtered_edges =