Top "Unique" questions

Refers to an element that is distinctly different from any other element in a collection.

Get all unique values in a JavaScript array (remove duplicates)

I have an array of numbers that I need to make sure are unique. I found the code snippet below …

javascript arrays unique
Remove duplicate values from JS array

I have a very simple JavaScript array that may or may not contain duplicates. var names = ["Mike","Matt","Nancy","Adam","…

javascript arrays duplicates unique
Count unique values with pandas per groups

I need to count unique ID values in every domain I have data ID, domain 123, 'vk.com' 123, 'vk.com' 123, 'twitter.…

python pandas group-by unique pandas-groupby
How to get distinct values from an array of objects in JavaScript?

Assuming I have the following: var array = [ {"name":"Joe", "age":17}, {"name":"Bob", "age":17}, {"name":"Carl", "age": 35} ] What is the best …

javascript arrays unique
How do you remove duplicates from a list whilst preserving order?

Is there a built-in that removes duplicates from list in Python, whilst preserving order? I know that I can use …

python list duplicates unique
Count number of occurences for each unique value

Let's say I have: v = rep(c(1,2, 2, 2), 25) Now, I want to count the number of times each unique value appears. …

r count unique
Generate 'n' unique random numbers within a range

I know how to generate a random number within a range in Python. random.randint(numLow, numHigh) And I know …

python random unique
Plot multiple lines (data series) each with unique color in R

I am fairly new to R and I have the following queries : I am trying to generate a plot in …

r colors plot unique lines
How do I count unique values inside a list

So I'm trying to make this program that will ask the user for input and store the values in an …

python arrays variables loops unique
Select unique or distinct values from a list in UNIX shell script

I have a ksh script that returns a long list of values, newline separated, and I want to see only …

bash unique distinct ksh sh