Skip to content
Snippets Groups Projects
Commit c106c939 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

FIX: updated dataframe needs to be returned

parent a612f4b0
No related branches found
No related tags found
1 merge request!39Release 0.4.0
Pipeline #17512 passed
...@@ -156,6 +156,9 @@ def win_path_converter(val): ...@@ -156,6 +156,9 @@ def win_path_converter(val):
checks whether the value looks like a windows path and converts it to posix checks whether the value looks like a windows path and converts it to posix
""" """
if val == "":
return val
if not check_win_path(val): if not check_win_path(val):
raise ValueError( raise ValueError(
"Field should be a Windows path, but is\n'{}'.".format(val)) "Field should be a Windows path, but is\n'{}'.".format(val))
...@@ -367,6 +370,8 @@ class TableImporter(object): ...@@ -367,6 +370,8 @@ class TableImporter(object):
if len(self.unique_keys) > 0: if len(self.unique_keys) > 0:
df = self.check_unique(df, filename=filename) df = self.check_unique(df, filename=filename)
return df
class XLSImporter(TableImporter): class XLSImporter(TableImporter):
def read_file(self, filename, **kwargs): def read_file(self, filename, **kwargs):
...@@ -405,7 +410,7 @@ class XLSImporter(TableImporter): ...@@ -405,7 +410,7 @@ class XLSImporter(TableImporter):
'category': "inconsistency"}) 'category': "inconsistency"})
raise DataInconsistencyError(*e.args) raise DataInconsistencyError(*e.args)
self.check_dataframe(df, filename) df = self.check_dataframe(df, filename)
return df return df
...@@ -422,7 +427,7 @@ class CSVImporter(TableImporter): ...@@ -422,7 +427,7 @@ class CSVImporter(TableImporter):
'category': "inconsistency"}) 'category': "inconsistency"})
raise DataInconsistencyError(*ve.args) raise DataInconsistencyError(*ve.args)
self.check_dataframe(df, filename) df = self.check_dataframe(df, filename)
return df return df
...@@ -439,6 +444,6 @@ class TSVImporter(TableImporter): ...@@ -439,6 +444,6 @@ class TSVImporter(TableImporter):
'category': "inconsistency"}) 'category': "inconsistency"})
raise DataInconsistencyError(*ve.args) raise DataInconsistencyError(*ve.args)
self.check_dataframe(df, filename) df = self.check_dataframe(df, filename)
return df return df
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment