Skip to content

Commit

Permalink
Export pl.exclude() (#1508)
Browse files Browse the repository at this point in the history
  • Loading branch information
markfairbanks committed Oct 9, 2021
1 parent 10c2aab commit acd2f8b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions py-polars/polars/lazy/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"concat_str",
"concat_list",
"collect_all",
"exclude",
]


Expand Down
6 changes: 6 additions & 0 deletions py-polars/tests/test_lazy.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,12 @@ def test_regex_selection():
assert df.select([col("^foo.*$")]).columns == ["foo", "fooey", "foobar"]


def test_exclude_selection():
df = pl.DataFrame({"a": [1], "b": [1], "c": [1]}).lazy()

assert df.select([pl.exclude("a")]).columns == ["b", "c"]


def test_literal_projection():
df = pl.DataFrame({"a": [1, 2]})
assert df.select([True]).dtypes == [pl.Boolean]
Expand Down

0 comments on commit acd2f8b

Please sign in to comment.