Skip to content

Commit 91e65b6

Browse files
avoid dtype inference warnings by removing explicit dtype=object
1 parent 39260a0 commit 91e65b6

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

pandas/tests/dtypes/test_missing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def test_isna_isnull(self, isna_f):
131131
[
132132
np.arange(4, dtype=float),
133133
[0.0, 1.0, 0.0, 1.0],
134-
Series(list("abcd"), dtype=object),
134+
Series(list("abcd")),
135135
date_range("2020-01-01", periods=4),
136136
],
137137
)

pandas/tests/frame/methods/test_set_index.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ def test_set_index(self, float_string_frame):
158158
def test_set_index_names(self):
159159
df = DataFrame(
160160
np.ones((10, 4)),
161-
columns=Index(list("ABCD"), dtype=object),
162-
index=Index([f"i-{i}" for i in range(10)], dtype=object),
161+
columns=Index(list("ABCD")),
162+
index=Index([f"i-{i}" for i in range(10)]),
163163
)
164164
df.index.name = "name"
165165

pandas/tests/series/indexing/test_getitem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ def test_getitem_no_matches(self, box):
360360
# GH#33462 we expect the same behavior for list/ndarray/Index/Series
361361
ser = Series(["A", "B"])
362362

363-
key = Series(["C"], dtype=object)
363+
key = Series(["C"])
364364
key = box(key)
365365

366366
msg = r"None of \[Index\(\['C'\], dtype='object|str'\)\] are in the \[index\]"

0 commit comments

Comments
 (0)