Skip to content

Commit 1b277d0

Browse files
committed
write test
1 parent c3156ec commit 1b277d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_frame.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,12 @@ def test_slice_setitem() -> None:
290290

291291
def test_types_setitem() -> None:
292292
df = pd.DataFrame(data={"col1": [1, 2], "col2": [3, 4], 5: [6, 7]})
293+
h = cast(Hashable, "col1")
293294
i = pd.Index(["col1", "col2"])
294295
s = pd.Series(["col1", "col2"])
295296
a = np.array(["col1", "col2"])
296297
df["col1"] = [1, 2]
297-
df[5] = [5, 6]
298+
df[h] = [5, 6]
298299
df[["col1", "col2"]] = [[1, 2], [3, 4]]
299300
df[s] = [5, 6]
300301
df.loc[:, s] = [5, 6]

0 commit comments

Comments
 (0)