Skip to content

Commit e5f96b2

Browse files
committed
updated value_counts subset test
1 parent 245526b commit e5f96b2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/tests/frame/methods/test_value_counts.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,15 @@ def test_data_frame_value_counts_subset(nulls_fixture):
160160
index=pd.Index(["John", "Anne", "Beth"], name="first_name"),
161161
)
162162

163+
tm.assert_series_equal(result, expected)
164+
163165
df = pd.DataFrame(
164166
{100: [2, 100, 5, 9], 200: [2, 6, 2, 6], 300: [4, 6, 2, 1]},
165167
)
166168
result = df.value_counts([200])
167169
expected = pd.Series(
168170
data=[2, 2],
169-
index=pd.Index([2, 6], name=200),
171+
index=pd.MultiIndex.from_arrays([[2, 6]], names=[200]),
170172
)
171173

172174
tm.assert_series_equal(result, expected)

0 commit comments

Comments
 (0)