The error indicates that your dataframe index has non-unique (repeated) values. Since it appears you’re not using the index, you could create a new one with:
df.reset_index(inplace=True)
or
df.reset_index(drop=True, inplace=True)
if you want to remove the previous index.
Check this link as well.