I am trying to use drop_duplicates method on my dataframe, but I am getting an error. See the following:
error: TypeError: unhashable type: \'list\'<
Overview: you can see which rows are duplicated
Method 1:
df2=df.copy()
mylist=df2.iloc[0,1]
df2.iloc[0,1]=' '.join(map(str,mylist))
mylist=df2.iloc[1,1]
df2.iloc[1,1]=' '.join(map(str,mylist))
duplicates=df2.duplicated(keep=False)
print(df2[duplicates])
Method 2:
print(df.astype(str).duplicated(keep=False))