nest.graphcreator package
Submodules
nest.graphcreator.make_graph module
- nest.graphcreator.make_graph.makeDirectedGraph(df, srcColNames: List[str], dstColNames: List[str], weightCol: str, directed: bool = True)
Constructs a graph from a dataframe. This function takes a dataframe and constructs a graph in which each of the rows represents an edge.
- Parameters:
df – pandas dataframe where each row represents an edge
srcColNames – Columns that represent the source columns
dstColNames – Columns that represent the destination columns
weightCol – Column that represents the edge weight
- Returns:
A networkx graph
- nest.graphcreator.make_graph.makeTimeSeriesOfGraphs(df, timeCol: str, srcColNames: List[str], dstColNames: List[str], weightCol: str, directed: bool = True)
Constructs a graph from a dataframe. This function takes a dataframe and constructs a graph in which each of the rows represents an edge.
- Parameters:
df – pandas dataframe where each row represents an edge
timeCol – Columns that represent the time column
srcColNames – Columns that represent the source columns
dstColNames – Columns that represent the destination columns
weightCol – Column that represents the edge weight
- Returns:
A networkx graph