Skip to content

Commit 18293ab

Browse files
louisjbrockmendel
louis
authored andcommitted
TST: Refactor test for empty groupby with categorical data.
1 parent 3396aa7 commit 18293ab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/tests/groupby/test_categorical.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,9 @@ def test_categorical_no_compress():
783783

784784
def test_groupby_empty_with_category():
785785
# GH-9614
786-
df = pd.DataFrame({"A": [None] * 3, "B": pd.Categorical(["train", "train", "test"])})
786+
df = pd.DataFrame(
787+
{"A": [None] * 3, "B": pd.Categorical(["train", "train", "test"])}
788+
)
787789
result = df.groupby("A").first()["B"]
788790
expected = pd.Series(
789791
pd.Categorical([], categories=["test", "train"]),

0 commit comments

Comments
 (0)