Skip to content

Commit

Permalink
fix: Correct categorical namespace error message (#19558)
Browse files Browse the repository at this point in the history
  • Loading branch information
barak1412 authored Nov 1, 2024
1 parent f38e56b commit aaf0a11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ fn check_namespace(function: &FunctionExpr, first_dtype: &DataType) -> PolarsRes
},
#[cfg(feature = "dtype-categorical")]
FunctionExpr::Categorical(_) => {
polars_ensure!(matches!(first_dtype, DataType::Categorical(_, _)), InvalidOperation: "expected Struct type, got: {}", first_dtype)
polars_ensure!(matches!(first_dtype, DataType::Categorical(_, _)), InvalidOperation: "expected Categorical type, got: {}", first_dtype)
},
_ => {},
}
Expand Down
2 changes: 1 addition & 1 deletion py-polars/tests/unit/datatypes/test_categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ def test_cat_append_lexical_sorted_flag() -> None:
def test_get_cat_categories_multiple_chunks() -> None:
df = pl.DataFrame(
[
pl.Series("e", ["a", "b"], pl.Enum(["a", "b"])),
pl.Series("e", ["a", "b"], pl.Categorical),
]
)
df = pl.concat(
Expand Down

0 comments on commit aaf0a11

Please sign in to comment.