Skip to content

Commit

Permalink
fix: Fix typo in DuplicateError error message (#18855)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigogiraoserrao authored Sep 23, 2024
1 parent d27fcb3 commit 33f3fa0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/polars-error/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ Alternatively, if the performance cost is acceptable, you could just set:
on startup."#.trim_start())
};
(duplicate = $name:expr) => {
polars_err!(Duplicate: "column with name '{}' has more than one occurrences", $name)
polars_err!(Duplicate: "column with name '{}' has more than one occurrence", $name)
};
(col_not_found = $name:expr) => {
polars_err!(ColumnNotFound: "{:?} not found", $name)
Expand Down
2 changes: 1 addition & 1 deletion py-polars/tests/unit/operations/test_pivot.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ def test_pivot_struct() -> None:

def test_duplicate_column_names_which_should_raise_14305() -> None:
df = pl.DataFrame({"a": [1, 3, 2], "c": ["a", "a", "a"], "d": [7, 8, 9]})
with pytest.raises(DuplicateError, match="has more than one occurrences"):
with pytest.raises(DuplicateError, match="has more than one occurrence"):
df.pivot(index="a", on="c", values="d")


Expand Down

0 comments on commit 33f3fa0

Please sign in to comment.