Skip to content

Commit

Permalink
Fix #684 Merge results from main and derived catalogs
Browse files Browse the repository at this point in the history
  • Loading branch information
rbeucher committed Nov 1, 2024
1 parent 090cb85 commit a941786
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions intake_esm/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,11 +420,8 @@ def search(

if derivedcat_results:
# Merge results from the main and the derived catalogs
esmcat_results = (
pd.concat([esmcat_results, *derivedcat_results])
.drop_duplicates()
.reset_index(drop=True)
)
esmcat_results = pd.concat([esmcat_results, *derivedcat_results])
esmcat_results = (esmcat_results[~esmcat_results.astype(str).duplicated()])

cat = self.__class__({'esmcat': self.esmcat.dict(), 'df': esmcat_results})
cat.esmcat.catalog_file = None # Don't save the catalog file
Expand Down

0 comments on commit a941786

Please sign in to comment.