From e320623a40c30b611eaa2907884e337d360c4d19 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 23 Jan 2022 14:22:36 +0100 Subject: [PATCH] simplified dict keeps order since Python 3.6 --- python/damask/_table.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/python/damask/_table.py b/python/damask/_table.py index 418549cbb..68ed869c3 100644 --- a/python/damask/_table.py +++ b/python/damask/_table.py @@ -548,12 +548,8 @@ class Table: Filename or file for writing. """ - data_column_items = [] - for col in self.data.columns: - if col not in data_column_items: - data_column_items.append(col) labels = [] - for l in data_column_items: + for l in list(dict.fromkeys(self.data.columns)): if self.shapes[l] == (1,): labels.append(f'{l}') elif len(self.shapes[l]) == 1: