Skip to content

Commit 8718976

Browse files
committed
fixing test cases where the position of NaN has changed
1 parent 6e54f2e commit 8718976

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas/tests/arrays/string_/test_string.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ def test_value_counts_na(dtype, request):
497497

498498
arr = pd.array(["a", "b", "a", pd.NA], dtype=dtype)
499499
result = arr.value_counts(dropna=False)
500-
expected = pd.Series([2, 1, 1], index=["a", pd.NA, "b"], dtype="Int64")
500+
expected = pd.Series([2, 1, 1], index=["a", "b", pd.NA], dtype="Int64")
501501
tm.assert_series_equal(result, expected)
502502

503503
result = arr.value_counts(dropna=True)

pandas/tests/series/methods/test_value_counts.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def test_value_counts_categorical_with_nan(self):
185185
(
186186
Series([False, True, True, pd.NA]),
187187
False,
188-
Series([2, 1, 1], index=[True, pd.NA, False]),
188+
Series([2, 1, 1], index=[True, False, pd.NA]),
189189
),
190190
(
191191
Series([False, True, True, pd.NA]),
@@ -195,7 +195,7 @@ def test_value_counts_categorical_with_nan(self):
195195
(
196196
Series(range(3), index=[True, False, np.nan]).index,
197197
False,
198-
Series([1, 1, 1], index=[np.nan, True, False]),
198+
Series([1, 1, 1], index=[True, False, np.nan]),
199199
),
200200
],
201201
)

0 commit comments

Comments
 (0)