From fa82d3bc8142779e8cd36a0266c4f609bfff7af5 Mon Sep 17 00:00:00 2001 From: Alexander Beedie Date: Wed, 2 Aug 2023 18:26:58 +0400 Subject: [PATCH] fix conflation of str/collection --- py-polars/polars/lazyframe/frame.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/py-polars/polars/lazyframe/frame.py b/py-polars/polars/lazyframe/frame.py index 741deaaafab10..df6422d12c6fb 100644 --- a/py-polars/polars/lazyframe/frame.py +++ b/py-polars/polars/lazyframe/frame.py @@ -3371,7 +3371,11 @@ def drop( """ input_cols: list[str | SelectorType] = [ - *(columns if isinstance(columns, Collection) else [columns]), # type: ignore[list-item] + *( + columns + if isinstance(columns, Collection) and not isinstance(columns, str) + else [columns] # type: ignore[list-item] + ), *more_columns, ] drop_cols: list[str] = []