simplified

dict keeps order since Python 3.6
This commit is contained in:
Martin Diehl 2022-01-23 14:22:36 +01:00
parent 3e584570b2
commit e320623a40
1 changed files with 1 additions and 5 deletions

View File

@ -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: