Top "Duplicates" questions

The "duplicates" tag concerns detecting and/or dealing with multiple instances of items in collections.

Remove duplicated rows

I have read a CSV file into an R data.frame. Some of the rows have the same element in …

r duplicates r-faq
What's the most efficient way to erase duplicates and sort a vector?

I need to take a C++ vector with potentially a lot of elements, erase duplicates, and sort it. I currently …

c++ sorting vector stl duplicates
Drop all duplicate rows across multiple columns in Python Pandas

The pandas drop_duplicates function is great for "uniquifying" a dataframe. However, one of the keyword arguments to pass is …

python pandas duplicates drop-duplicates
How do I remove duplicates from a C# array?

I have been working with a string[] array in C# that gets returned from a function call. I could possibly …

c# arrays duplicates
Java: Detect duplicates in ArrayList?

How could I go about detecting (returning true/false) whether an ArrayList contains more than one of the same element …

java arrays arraylist duplicates
How do I check if there are duplicates in a flat list?

For example, given the list ['one', 'two', 'one'], the algorithm should return True, whereas given ['one', 'two', 'three'] it should …

python string list duplicates
Map implementation with duplicate keys

I want to have a map with duplicate keys. I know there are many map implementations (Eclipse shows me about 50), …

java duplicates guava multimap
How do I get a list of all the duplicate items using pandas in python?

I have a list of items that likely has some export issues. I would like to get a list of …

python pandas duplicates
In MySQL, can I copy one row to insert into the same table?

insert into table select * from table where primarykey=1 I just want to copy one row to insert into the same …

mysql copy duplicates row
Remove duplicate elements from array in Ruby

I have a Ruby array which contains duplicate elements. array = [1,2,2,1,4,4,5,6,7,8,5,6] How can I remove all the duplicate elements from this …

ruby-on-rails arrays ruby duplicates