From 670fd1b73ec818bcd540e367380925b7ac2ce5cb Mon Sep 17 00:00:00 2001 From: raj_mathe Date: Fri, 10 Jun 2022 16:38:42 +0200 Subject: [PATCH] master > master: code py - Tarjan / Tabellenspalten umgetauscht --- code/python/src/algorithms/tarjan/algorithms.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/python/src/algorithms/tarjan/algorithms.py b/code/python/src/algorithms/tarjan/algorithms.py index c644334..0efa697 100644 --- a/code/python/src/algorithms/tarjan/algorithms.py +++ b/code/python/src/algorithms/tarjan/algorithms.py @@ -179,14 +179,15 @@ class Context(ContextDefault): def repr(self) -> str: table = pd.DataFrame([ self.infos[u] for u in self.finished ]) \ - .drop(columns='state') + .drop(columns='state'); + table = table[['node', 'index', 'least_index']]; # benutze pandas-Dataframe + tabulate, um schöner darzustellen: repr = tabulate( table, headers = { 'Knoten': 'node', - 'kleinster Idx': 'least_index', - 'Index': 'index', + 'Idx': 'index', + 'min. Idx': 'least_index', }, showindex = False, stralign = 'center',