left and right each have an id column.
Stack the two tables and return the ids occurring more than once in total, whether the repeats are inside one table or split across both. Return a Series of ids sorted ascending with the index renumbered from 0.
Input
left =
id
0 1
1 2
2 2
3 3
right =
id
0 3
1 4
2 5
Output
0 2
1 3
dtype: int64