# 获取单字段
df1 = df["列名1"]
df2 = df["列名2"]
df1
# 打包数据
zipped = list(zip(df1, df2))
list1 = [list(i) for i in zipped]
list1
# 从python列表中删除重复的组合元组
for i in list1:
i.sort()
mylist = list(set(map(tuple, list1)))
# 转换为dataframe
df = pd.DataFrame(mylist)
标签:删除,df,list1,df1,列表,list,元组
From: https://www.cnblogs.com/tiansz/p/16640211.html