cugraph.experimental.PropertyGraph.get_vertices#
- PropertyGraph.get_vertices(selection=None)[source]#
Return a Series containing the unique vertex IDs contained in both the vertex and edge property data in ascending order. Selection is not yet supported.
- Parameters:
- selectionPropertySelection, optional
A PropertySelection returned from one or more calls to select_vertices() and/or select_edges()
- Returns:
- cudf series or pandas series, optional
Contains vertices that match the selection or all
Examples
>>> import cugraph >>> import cudf >>> from cugraph.experimental import PropertyGraph >>> df = cudf.DataFrame(columns=["src", "dst", "some_property"], ... data=[(99, 22, "a"), ... (98, 34, "b"), ... (97, 56, "c"), ... (96, 88, "d"), ... ]) >>> pG = PropertyGraph() >>> pG.add_edge_data(df, type_name="etype", vertex_col_names=("src", "dst")) >>> pG.get_vertices() 0 22 1 34 2 56 3 88 4 96 5 97 6 98 7 99 dtype: int64