diff --git a/wetb/dlc/high_level.py b/wetb/dlc/high_level.py index 3c60746f16e71fee67c370ea615afb86cf62c931..6c29c4589245b066667d89bf4b55cf05593eaa87 100644 --- a/wetb/dlc/high_level.py +++ b/wetb/dlc/high_level.py @@ -126,7 +126,9 @@ class DLCHighLevel(object): def sensor_info(self, sensors=[]): if sensors != []: - return self.sensor_df[functools.reduce(np.logical_or, [((self.sensor_df.get(f, pd.DataFrame([""] * len(self.sensor_df.name))[0]).values != "") | (self.sensor_df.name == f)) for f in np.atleast_1d(sensors)])] + sensors = np.atleast_1d(sensors) + empty_column = pd.DataFrame([""] * len(self.sensor_df.name))[0] + return self.sensor_df[functools.reduce(np.logical_or, [((self.sensor_df.get(f, empty_column).values != "") | (self.sensor_df.name == f)) for f in sensors])] else: return self.sensor_df diff --git a/wetb/dlc/tests/test_files/DLC_test.xlsx b/wetb/dlc/tests/test_files/DLC_test.xlsx index 8c6c9a112a2c323f220dd424c392b56ea4b101c4..5945bc4a9399508b45140e4feaacf7d84caa659c 100644 Binary files a/wetb/dlc/tests/test_files/DLC_test.xlsx and b/wetb/dlc/tests/test_files/DLC_test.xlsx differ