Skip to content

Commit 2536652

Browse files
committed
Add test for the linked issue
1 parent d4a031b commit 2536652

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/tests/indexing/test_loc.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ def test_not_change_nan_loc(series, new_series, expected_ser):
6060
tm.assert_frame_equal(df.notna(), ~expected)
6161

6262

63+
def test_loc_dtype():
64+
# GH 60600
65+
df = DataFrame([["a", 1.0, 2.0], ["b", 3.0, 4.0]])
66+
result = df.loc[0, [1, 2]]
67+
expected = df[[1, 2]].loc[0]
68+
tm.assert_frame_equal(result, expected)
69+
70+
6371
class TestLoc:
6472
def test_none_values_on_string_columns(self, using_infer_string):
6573
# Issue #32218

0 commit comments

Comments
 (0)