Skip to content

Commit

Permalink
refactor(internals): remove unnecessary dynamism in drop method (#9682
Browse files Browse the repository at this point in the history
)
  • Loading branch information
cpcloud authored Jul 24, 2024
1 parent ff2d019 commit 5ac84c5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ibis/expr/types/relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -2501,9 +2501,7 @@ def drop(self, *fields: str | Selector) -> Table:
# no-op if nothing to be dropped
return self

columns_to_drop = frozenset(
map(operator.methodcaller("get_name"), self._fast_bind(*fields))
)
columns_to_drop = frozenset(map(Expr.get_name, self._fast_bind(*fields)))
return ops.DropColumns(parent=self, columns_to_drop=columns_to_drop).to_expr()

def filter(
Expand Down

0 comments on commit 5ac84c5

Please sign in to comment.