Skip to content

Commit 5a1a954

Browse files
authored
Add strict mapping to categorical map function
1 parent 607e489 commit 5a1a954

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/tests/arrays/categorical/test_map.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def test_map_with_dict_or_series(na_action):
130130
expected = Categorical(new_values, categories=[3.0, 2, "one"])
131131
tm.assert_categorical_equal(result, expected)
132132

133-
mapper = dict(zip(orig_values[:-1], new_values[:-1]))
133+
mapper = dict(zip(orig_values[:-1], new_values[:-1], strict=True))
134134
result = cat.map(mapper, na_action=na_action)
135135
# Order of categories in result can be different
136136
tm.assert_categorical_equal(result, expected)

0 commit comments

Comments
 (0)