Skip to content

Commit 965bf08

Browse files
author
tascillo
committed
BUG: GroupBy.ngroup dropna=False inconsistency when using Categorical pandas-dev#50100
added style fixes for previous commit
1 parent a13899e commit 965bf08

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/tests/groupby/test_missing.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import numpy as np
21
import math
2+
3+
import numpy as np
34
import pytest
45

56
import pandas as pd
@@ -158,8 +159,7 @@ def test_indices_with_missing():
158159

159160
def test_categorical_nan_no_dropna():
160161
# GH 50100
161-
df = DataFrame.from_dict({"a": pd.Categorical([np.nan]),
162-
"b": [1]})
162+
df = DataFrame.from_dict({"a": pd.Categorical([np.nan]), "b": [1]})
163163
g = df.groupby(["a", "b"], dropna=False)
164164
ng = g.ngroup()
165165
result = ng.iloc[0]

0 commit comments

Comments
 (0)