Skip to content

Commit

Permalink
More interprable varaible name
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-turner-1 committed Nov 13, 2024
1 parent e70b473 commit e7e5562
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/intake_dataframe_catalog/_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,17 @@ def search(
# Group by name_column and aggregate the other columns into lists
# first in this instance. Essentially the opposite of the previous
# group_by("index") operation.
nl_lf = lf.group_by(name_column).agg(
namelist_lf = lf.group_by(name_column).agg(
[
pl.col(col).explode().flatten().unique(maintain_order=True)
for col in (set(all_cols) - {name_column})
]
)
else:
nl_lf = lf
namelist_lf = lf

nl = (
nl_lf.filter(
namelist = (
namelist_lf.filter(
[
pl.col(colname).list.len() >= len(query[colname])
for colname in iterable_qcols
Expand All @@ -142,7 +142,7 @@ def search(
.collect()
.to_series()
)
lf = lf.filter(pl.col(name_column).is_in(nl))
lf = lf.filter(pl.col(name_column).is_in(namelist))

df = lf.explode(list(cols_to_deiter)).collect().to_pandas()

Expand Down

0 comments on commit e7e5562

Please sign in to comment.