Skip to content

Commit 2438a67

Browse files
authored
TST: iat with duplicate column names (#33362)
1 parent 06f4c90 commit 2438a67

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1+
import pandas as pd
2+
3+
14
def test_iat(float_frame):
25

36
for i, row in enumerate(float_frame.index):
47
for j, col in enumerate(float_frame.columns):
58
result = float_frame.iat[i, j]
69
expected = float_frame.at[row, col]
710
assert result == expected
11+
12+
13+
def test_iat_duplicate_columns():
14+
# https://github.com/pandas-dev/pandas/issues/11754
15+
df = pd.DataFrame([[1, 2]], columns=["x", "x"])
16+
assert df.iat[0, 0] == 1

0 commit comments

Comments
 (0)