-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Marco Edward Gorelli <[email protected]>
- Loading branch information
1 parent
a4028e9
commit 17c07b2
Showing
2 changed files
with
21 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from __future__ import annotations | ||
|
||
from typing import Any | ||
|
||
import pytest | ||
|
||
import narwhals.stable.v1 as nw | ||
|
||
|
||
@pytest.mark.parametrize( | ||
("drop", "left"), | ||
[ | ||
(["a"], ["b", "z"]), | ||
(["a", "b"], ["z"]), | ||
], | ||
) | ||
def test_drop(constructor: Any, drop: list[str], left: list[str]) -> None: | ||
data = {"a": [1, 3, 2], "b": [4, 4, 6], "z": [7.0, 8, 9]} | ||
df = nw.from_native(constructor(data)) | ||
assert df.drop(drop).columns == left | ||
assert df.drop(*drop).columns == left |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters