Skip to content

Commit b3f9151

Browse files
committed
_sanitize_column now reports proper duplicate error
1 parent 0730cd0 commit b3f9151

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/core/frame.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1962,6 +1962,8 @@ def _sanitize_column(self, key, value):
19621962
# GH 4107
19631963
try:
19641964
value = value.reindex(self.index).values
1965+
except ValueError as e:
1966+
raise e
19651967
except:
19661968
raise TypeError('incompatible index of inserted column '
19671969
'with frame index')

0 commit comments

Comments
 (0)