Skip to content

Commit 7c67b23

Browse files
committed
Raise error when combination of given values don't make sense
1 parent 81f64af commit 7c67b23

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/core/reshape/concat.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,12 @@ def concat(
379379
0 1 2
380380
1 3 4
381381
"""
382+
if ignore_index and keys is not None:
383+
raise ValueError(
384+
"Setting ignore_index to true and providing key values are "
385+
"counterproductive. Either should be used."
386+
)
387+
382388
if copy is not lib.no_default:
383389
warnings.warn(
384390
"The copy keyword is deprecated and will be removed in a future "

0 commit comments

Comments
 (0)