Using
ids = findall(nonunique(mydata))
I have found the ids of all rows that are duplicates. Now, I want to clean mydata by erasing the duplicate rows.
How is that done?
Using
ids = findall(nonunique(mydata))
I have found the ids of all rows that are duplicates. Now, I want to clean mydata by erasing the duplicate rows.
How is that done?
Here is one approach:
df = df[Not(ids), :]
Or
df = unique(df)
To do the same by modifying the existing dataframe:
delete!(df, ids)
or directly with the boolean array
delete!(df, nonunique(df))
or simply
unique!(df)