cugraph.experimental.PropertyGraph.is_multigraph#
- classmethod PropertyGraph.is_multigraph(df)[source]#
- Parameters:
- dfdataframe
Containing edge data
- Returns:
- bool
True if df has one or more edges with the same source, destination pair
Examples
>>> import cugraph >>> import cudf >>> from cugraph.experimental import PropertyGraph >>> pG = PropertyGraph() >>> df = cudf.DataFrame(columns=["src", "dst", "edge_ids", "some_property"], ... data=[(99, 22, 3, "a"), ... (98, 34, 5, "b"), ... (98, 34, 7, "c"), ... (96, 88, 11, "d"), ... ]) >>> pG.add_edge_data(df, type_name="etype", ... vertex_col_names=("src", "dst"), ... edge_id_col_name="edge_ids") >>> pG.is_multigraph(pG.get_edge_data()) True