hatchet/graphframe.py
def from_lists(*lists):
        """Make a simple GraphFrame from lists.

        This creates a Graph from lists (see ``Graph.from_lists()``) and uses
        it as the index for a new GraphFrame. Every node in the new graph has
        exclusive time of 1 and inclusive time is computed automatically.

        """
        graph = Graph.from_lists(*lists)
        graph.enumerate_traverse()

        df = pd.DataFrame({"node": list(graph.traverse())})
        df["time"] = [1.0] * len(graph)
        df.set_index(["node"], inplace=True)
        df.sort_index(inplace=True)

        gf = GraphFrame(graph, df, ["time"], [])
        gf.update_inclusive_columns()
        return gf
Make a simple GraphFrame from lists.

        This creates a Graph from lists (see ``Graph.from_lists()``) and uses
        it as the index for a new GraphFrame. Every node in the new graph has
        exclusive time of 1 and inclusive time is computed automatically.

        
Make a simple GraphFrame from lists.
This creates a Graph from lists ``) and uses
it as the index for a new GraphFrame. Every node in the new graph has
exclusive time of 1 and inclusive time is computed automatically.
Make a simple GraphFrame from lists . This creates a Graph from lists ` ` ) and uses it as the index for a new GraphFrame . Every node in the new graph has exclusive time of 1 and inclusive time is computed automatically .
def from_lists(*lists):
        graph = Graph.from_lists(*lists)
        graph.enumerate_traverse()
        df = pd.DataFrame({"node": list(graph.traverse())})
        df["time"] = [1.0] * len(graph)
        df.set_index(["node"], inplace=True)
        df.sort_index(inplace=True)
        gf = GraphFrame(graph, df, ["time"], [])
        gf.update_inclusive_columns()
        return gf
def from_lists ( * lists ) : graph = Graph . from_lists ( * lists ) graph . enumerate_traverse ( ) df = pd . DataFrame ( { "node" : list ( graph . traverse ( ) ) } ) df [ "time" ] = [ 1.0 ] * len ( graph ) df . set_index ( [ "node" ] , inplace = True ) df . sort_index ( inplace = True ) gf = GraphFrame ( graph , df , [ "time" ] , [ ] ) gf . update_inclusive_columns ( ) return gf
Make a simple GraphFrame from lists.
Make a simple GraphFrame from lists .
"""Make a simple GraphFrame from lists.

        This creates a Graph from lists (see ``Graph.from_lists()``) and uses
        it as the index for a new GraphFrame. Every node in the new graph has
        exclusive time of 1 and inclusive time is computed automatically.

        """