Skip to content

Commit

Permalink
LLCAXCHZF-61/use drop with errors ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
TomeCirun committed Oct 18, 2024
1 parent d0b9191 commit 833ed81
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ckanext/charts/fetchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 833ed81

Please sign in to comment.