hatchet/graphframe.py
def tree(
        self,
        metric_column="time",
        precision=3,
        name_column="name",
        expand_name=False,
        context_column="file",
        rank=0,
        thread=0,
        depth=10000,
        highlight_name=True,
        invert_colormap=False,
        color=None,  # remove in next release
        threshold=None,  # remove in next release
        unicode=None,  # remove in next release
    ):
        """Format this graphframe as a tree and return the resulting string."""
        color = sys.stdout.isatty()
        shell = None

        if color is False:
            try:
                import IPython

                shell = IPython.get_ipython().__class__.__name__
            except ImportError:
                pass
            # Test if running in a Jupyter notebook or qtconsole
            if shell == "ZMQInteractiveShell":
                color = True

        return ConsoleRenderer(unicode=True, color=color).render(
            self.graph.roots,
            self.dataframe,
            metric_column=metric_column,
            precision=precision,
            name_column=name_column,
            expand_name=expand_name,
            context_column=context_column,
            rank=rank,
            thread=thread,
            depth=depth,
            highlight_name=highlight_name,
            invert_colormap=invert_colormap,
        )
Format this graphframe as a tree and return the resulting string.
Format this graphframe as a tree and return the resulting string.
Format this graphframe as a tree and return the resulting string .
def tree(
        self,
        metric_column="time",
        precision=3,
        name_column="name",
        expand_name=False,
        context_column="file",
        rank=0,
        thread=0,
        depth=10000,
        highlight_name=True,
        invert_colormap=False,
        color=None,  
        threshold=None,  
        unicode=None,  
    ):
        color = sys.stdout.isatty()
        shell = None
        if color is False:
            try:
                import IPython
                shell = IPython.get_ipython().__class__.__name__
            except ImportError:
                pass
            if shell == "ZMQInteractiveShell":
                color = True
        return ConsoleRenderer(unicode=True, color=color).render(
            self.graph.roots,
            self.dataframe,
            metric_column=metric_column,
            precision=precision,
            name_column=name_column,
            expand_name=expand_name,
            context_column=context_column,
            rank=rank,
            thread=thread,
            depth=depth,
            highlight_name=highlight_name,
            invert_colormap=invert_colormap,
        )
def tree ( self , metric_column = "time" , precision = 3 , name_column = "name" , expand_name = False , context_column = "file" , rank = 0 , thread = 0 , depth = 10000 , highlight_name = True , invert_colormap = False , color = None , threshold = None , unicode = None , ) : color = sys . stdout . isatty ( ) shell = None if color is False : try : import IPython shell = IPython . get_ipython ( ) . __class__ . __name__ except ImportError : pass if shell == "ZMQInteractiveShell" : color = True return ConsoleRenderer ( unicode = True , color = color ) . render ( self . graph . roots , self . dataframe , metric_column = metric_column , precision = precision , name_column = name_column , expand_name = expand_name , context_column = context_column , rank = rank , thread = thread , depth = depth , highlight_name = highlight_name , invert_colormap = invert_colormap , )
Format this graphframe as a tree and return the resulting string.
Format this graphframe as a tree and return the resulting string .
# remove in next release # remove in next release # remove in next release """Format this graphframe as a tree and return the resulting string.""" # Test if running in a Jupyter notebook or qtconsole
self
metric_column
precision
name_column
expand_name
context_column
rank
thread
depth
highlight_name
invert_colormap
color
threshold
unicode