I got a list containing row indexes to delete. The list contains duplicates so to lighten the burden I tried to remove duplicate entries:
invalid_rows = list(dict.fromkeys(invalid_rows))
Returning: TypeError: unhashable type: 'list'
Okey, well let's try with duplicate values just to see if I can remove the rows:
df = df.drop(index=invalid_rows)
Returning the same error code. What's the problem with the list? I tried to google but I can't seem to find the error.
invalid_rowslooks like. You should provide a stackoverflow.com/help/minimal-reproducible-example Did you consider using pandas.pydata.org/pandas-docs/stable/reference/api/… ?