diff --git a/ckanext/charts/fetchers.py b/ckanext/charts/fetchers.py index 1f8c806..5ea8ba0 100644 --- a/ckanext/charts/fetchers.py +++ b/ckanext/charts/fetchers.py @@ -71,11 +71,7 @@ def fetch_data(self) -> pd.DataFrame: .select_from(sa.table(self.resource_id)) .limit(self.limit), get_read_engine(), - ) - - existing_columns = {col for col in {'_id', '_full_text'} if col in df.columns} - if existing_columns: - df = df.drop(columns=existing_columns) + ).drop(columns=["_id", "_full_text"], errors='ignore') if "date_time" in df.columns: try: