Skip to content

Commit 9e08857

Browse files
committed
Add test case in which categories of fill values are in different order to categories of origin series
1 parent 550302a commit 9e08857

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/tests/series/test_missing.py

+8
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,14 @@ def test_fillna_categorical(self, fill_value, expected_output):
583583
[
584584
(Series(["a", "b", "c", "d", "e"]), ["a", "b", "b", "d", "e"]),
585585
(Series(["b", "d", "a", "d", "a"]), ["a", "d", "b", "d", "a"]),
586+
(
587+
Series(
588+
Categorical(
589+
["b", "d", "a", "d", "a"], categories=["b", "c", "d", "e", "a"]
590+
)
591+
),
592+
["a", "d", "b", "d", "a"],
593+
),
586594
],
587595
)
588596
def test_fillna_categorical_with_new_categories(self, fill_value, expected_output):

0 commit comments

Comments
 (0)