Skip to content

Commit cbabcad

Browse files
committed
Resolve warning
1 parent af97126 commit cbabcad

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas/tests/arrays/integer/test_function.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def test_value_counts_na():
105105

106106
def test_value_counts_empty():
107107
# https://github.com/pandas-dev/pandas/issues/33317
108-
s = pd.Series([])
108+
s = pd.Series([], dtype="float64")
109109
result = s.value_counts()
110110
# TODO: The dtype of the index seems wrong (it's int64 for non-empty)
111111
idx = pd.Float64Index([], dtype="float64")

pandas/tests/base/test_value_counts.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def test_value_counts_bins(index_or_series):
145145
if isinstance(s1, Index):
146146
tm.assert_index_equal(s1.unique(), Index([1, 2, 3]))
147147
else:
148-
exp = np.array([1, 2, 3], dtype="Int64")
148+
exp = np.array([1, 2, 3])
149149
tm.assert_numpy_array_equal(s1.unique(), exp)
150150

151151
assert s1.nunique() == 3
@@ -170,7 +170,7 @@ def test_value_counts_bins(index_or_series):
170170
# handle NA's properly
171171
s_values = ["a", "b", "b", "b", np.nan, np.nan, "d", "d", "a", "a", "b"]
172172
s = klass(s_values)
173-
expected = Series([4, 3, 2], index=["b", "a", "d"], dtype="Int64")
173+
expected = Series(data=[4, 3, 2], index=["b", "a", "d"], dtype="Int64")
174174
tm.assert_series_equal(s.value_counts(), expected)
175175

176176
if isinstance(s, Index):

0 commit comments

Comments
 (0)