diff --git a/suzieq/engines/pandas/devconfig.py b/suzieq/engines/pandas/devconfig.py index 7866f237ff..05a2dd1b98 100644 --- a/suzieq/engines/pandas/devconfig.py +++ b/suzieq/engines/pandas/devconfig.py @@ -21,7 +21,12 @@ def get(self, **kwargs): query_str = kwargs.pop('query_str', '') df = super().get(columns=columns, **kwargs) - if df.empty or 'error' in df.columns or not section: + if df.empty or 'error' in df.columns: + return df + + if not section: + if query_str: + df = df.query(query_str).reset_index(drop=True) return df devdf = self._get_table_sqobj('device') \