Mixin providing utility methods for graph type queries.
Supplies utility functions for graph-like queries, specifically the to_networkx function which returns a networkx graph which can then be analysed further using standard libraries.
to_networkx(self, source=None, target=None, directed_graph=True)
By default, the leftmost column will be used as the source, the next leftmost as the target, and any other columns will become edge attributes. Both or neither of source and target should be provided. The default is to return a directed graph.
Optionally specify the column name for the source nodes.
Optionally specify the column name for the target nodes.
Set to false to return an undirected graph.
This query as a networkx graph object.