Skip to content

Commit

Permalink
Filter rows before selecting columns in to_polars_df
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernardo Porto Veronese committed Jul 25, 2024
1 parent 973d380 commit ff7ebbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gladeparser/backends/polars.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def to_polars_df(
new_columns=descriptor.names,
null_values=["null"],
**kwargs,
).select(*(cols or descriptor.names))
)
if len(expr) > 0:
query = query.filter(*expr)

return query.collect()
return query.select(*(cols or descriptor.names)).collect()

0 comments on commit ff7ebbb

Please sign in to comment.