bugfixes: invalid python code

This commit is contained in:
Martin Diehl 2020-01-20 13:06:32 +01:00
parent b23479bfc9
commit e3d35b41b4
1 changed files with 6 additions and 6 deletions

View File

@ -23,10 +23,10 @@ class Table():
""" """
self.comments = [] if comments is None else [c for c in comments] self.comments = [] if comments is None else [c for c in comments]
try: if hasattr(data,'columns'):
self.data = data self.data = data
self.data.columns = [''] * len(self.data.columns) self.data.columns = [''] * len(self.data.columns)
except: else:
self.data = pd.DataFrame(data=data) self.data = pd.DataFrame(data=data)
self.shapes = shapes self.shapes = shapes
self.__label_condensed() self.__label_condensed()
@ -89,7 +89,7 @@ class Table():
comments = [] comments = []
line = f.readline().strip() line = f.readline().strip()
while line.startswith('#'): while line.startswith('#'):
comments.append(line.lstrip('#').lstrip()) comments.append(line.lstrip('#').strip())
line = f.readline().strip() line = f.readline().strip()
labels = line.split() labels = line.split()