diff --git a/src/caosadvancedtools/table_importer.py b/src/caosadvancedtools/table_importer.py index 56530879e49a7d93f38ecfa7b85fb5272e625c4e..8f793584051386796bce18bdbaded6c7e34c06ca 100755 --- a/src/caosadvancedtools/table_importer.py +++ b/src/caosadvancedtools/table_importer.py @@ -373,24 +373,20 @@ class TableImporter(): for index, row in df.iterrows(): # if none of the relevant information is given, skip - - if np.array([pd.isnull(row.loc[key]) for key in self.obligatory_columns - if key in df.columns]).all(): - + if pd.isnull(row.loc[[key for key in self.obligatory_columns if key in df.columns]]).all(): df = df.drop(index) continue # if any of the relevant information is missing, report it - i = 0 okay = True while okay and i < len(self.obligatory_columns): key = self.obligatory_columns[i] + i += 1 if key not in df.columns: continue - i += 1 if pd.isnull(row.loc[key]): errmsg = (