def convert(self, k, v, column): if column == 1: return "Y" if v[0] else "N" elif column == 2: return short_format(v[1]) else: raise ValueError
def _show_datasets(datasets): clear_screen() table = PrettyTable(["Dataset", "Persistent", "Value"]) for k, (persist, value) in sorted(datasets.items(), key=itemgetter(0)): table.add_row([k, "Y" if persist else "N", short_format(value)]) print(table)
def convert(self, k, v, column): return short_format(v[1])