小编Ank*_*kit的帖子

How to compare two columns value in pandas

I Have a dataframe which has some unique IDs in two of the columns.for e.g

S.no. Column1 Column2
    1  00001x  00002x
    2  00003j  00005k
    3  00002x  00001x
    4  00004d  00008e
Run Code Online (Sandbox Code Playgroud)

Value can be anything in the string format I want to compare the two column in such a way that either of s.no 1 or 3 data remains. as these id contains the same information. only its order is different.

Basically if for one row value in a column 1 …

python comparison string-comparison dataframe pandas

1
推荐指数
1
解决办法
221
查看次数