I have 4 columns of data A
, B
, C
, D
.
Some data are repeating such as row 1: P2 XX P6 XX
is repeating in row 5: P6 XX P2 XX
. Can anyone help me to remove the repeating units from Pandas dataframe?
A B C D
P2 XX P6 XX
P3 XX P5 XX
P5 XX P8 XX
P5 XX P3 XX
P6 XX P2 XX
P8 XX P5 XX
P1 LU P2 LU
P2 LU P1 LU
P3 LU P9 LU
P3 LU P6 LU
P6 LU P3 LU
P9 LU P3 LU
Output:
A B C D
P2 XX P6 XX
P3 XX P5 XX
P5 XX P8 XX
P1 LU P2 LU
P3 LU P9 LU
P3 LU P6 LU