pandas dataframe有两个列,其中包含需要获取id的id列表,而在其他列中不包含
id Column_1 Column_2
1 [1,2,5,7,9] [1,2,5,7]
2 [4,8,2,7] [4,8,2,7]
3 [5,7,2,9] [9]
4 [4,7,2,9] [3]
I want to result like
id Column_1 Column_2 result
1 [1,2,7] [1,2,5,7,9] [5,9]
2 [4,8,2,7] [4,8,2,7] []
3 [5,7,2,9] [9] []
4 [4,7,2,9] [3] [3]
将值转换为集合并获得差异:
相关问题 更多 >
编程相关推荐