我有一个excel文件,第一列中有公共项,如何使用python删除第一列中的公共项而不影响文件的其余部分
我的档案
Column1 Column2 Column2
PinkFloyd Wish You Were Here Wish You Were Here
PinkFloyd Comfortably Numb The Wall
AC_DC Highway to Hell Highway to Hell
AC_DC Thunderstruck The Razors Edge
所需输出-
Column1 Column2 Column3
PinkFloyd Wish You Were Here Wish You Were Here
Comfortably Numb The Wall
AC_DC Highway to Hell Highway to Hell
Thunderstruck The Razors Edge
使用
pandas
,特别是pandas.DataFrame.drop_duplicates
相关问题 更多 >
编程相关推荐