Questions tagged [unique]

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

0
votes
2answers
24 views

How do I keep and separate the data that is unique to each method, in all three methods, or in just two methods?

I have a data set where I have identified compounds from each different experimental method (Gradient, Isocratic, and HILIC). I would like to be able to store/subset results such that I get the ...
0
votes
0answers
39 views

Laravel validation unique combined with where closure

In an update method i need to check if the name of a project is unique for all projects of the same customer. Therefore i need to resctrict the compared rows by using a where closure. In addition to ...
0
votes
0answers
36 views

How to return single value when duplicate results in XSLT variable?

Using XSLT 1.0 (Xalan)- From this segment of input XML... <LineComponent> <Adjustment Type="Addition" Category="Premium" SubCategory="D240"> <...
0
votes
1answer
38 views

Excel Formula to Count Unique Values that Meet Multiple Criteria

I have a table that counts total occurrences that meet multiple criteria, now I need another table that counts unique values based on the same criteria. I have been playing with sumproduct and ...
0
votes
1answer
32 views

Count Dates for each variable

Need to sum the number of days a particular variable (animal) occurs Also, need to sum the total hours. In this example, I know macropod occurs on 11 days (all) and pig on (1). Need to replicate ...
0
votes
1answer
40 views

Is there an R function for finding to parse correctly txt files?

I have a test.txt file that has 7 headers. but not each row has 7 values. My txt file was showing only 1 column and I used read.delim to separate the columns. But when I count the unique values per ...
0
votes
4answers
31 views

Unique validation in Laravel depending by User ID

In my books app, I have the following rule on store request: 'title' => 'unique:books,title|required|min:3|max:128,' . $this->user()->id.',user_id', At this moment, with that validation ...
0
votes
1answer
9 views

How To Do Vlookup With Conditional

I am doing a Vlookup on and ads report. I have the following table: NAME DELIVERY AD_NAME_1 inactive AD_NAME_2 inactive AD_NAME_3 inactive AD_NAME_1 active AD_NAME_1 archived I ...
2
votes
1answer
75 views

Removing duplicate items from an array using C language

Removing duplicate items from a sorted array #include <stdio.h> #include<stdlib.h> int main() { int arr[12]={1,2,2,3,3,3,4,4,4,4,5,5}; int temp[12]; int i,j,k,n=12; for(...
1
vote
2answers
33 views

How do I get jq to return unique results when json has multiple identical entries?

jq ' .[]|select(.accountEnabled==true)|select(.assignedPlans[].service=="exchange" and .assignedPlans[].capabilityStatus=="Enabled").proxyAddresses[]' Below is a sample of json, it's the output of "...
-4
votes
0answers
21 views

Get unique list from lists [closed]

suppose I have a list of mylist = [[a,b,c][a,b,c,d][a,b,c,d,e][a,b,d,c,e][a,b,c,e,f][a,b,c,f,g]] If I want to extract the list that have longest unique values and order, how should I do it? ...
0
votes
1answer
36 views

How can I run a STDEV on specific cells based on mixed groups?

I have a spreadsheet that has the value of two groups of participants in an experiment (Group 1 and 2). It looks something like this: Group..........Value 1...............5 2...............3 1...........
0
votes
1answer
63 views

Formula to repeat a previous row multiple times based on a number in a cell

I have multiple lines of data that refer to x number of females and x number of males per line. I need to break them out into individual records (1 row for each). Is there an excel formula that ...
1
vote
1answer
46 views

R unique command and table command disagree

I have a strange problem. To illustrate: a <- c(3.099331946117620972814, 3.099331946117621860992) > unique(a) [1] 3.099331946117620972814 3.099331946117621860992 > table(a) a 3....
0
votes
6answers
32 views

Filling Array with unique values

Pretty basic question here I think but not one I could find an answer for - I have a bunch of arrays that I want to extract unique values from. Each array has a list of skills a candidate is ...
-3
votes
2answers
33 views

Javascript: find the length of the longest substring of unique characters

I have a following problem here: I need to find out the length of the longest substring of unique characters. like, I have a string thequickbrownfoxjumpsoveralazydog and I expect to get 14 (the ...
0
votes
1answer
15 views

How to assign random unique value generated by the database to Hibernate POJO's field

The problem is that I need to generate unique value for the one of my POJOs field in Java. I am using Hibernate. It is pretty simple to solve it using sequence generator, but in my reality I need to ...
1
vote
1answer
41 views

SQL query? SELECT the inverse of this query?

I am trying to find duplicates of wordpress posts using SQL - but duplicates according to duplicate post meta - not duplicate titles. So far the closest code I could find does the opposite - it finds ...
0
votes
0answers
5 views

How to get unique information of user on browser in javascript

I have written a script (javascript) that can track users on my websites. For example: user A (stranger, not login) access my website M and do some activities, then the user A access my other website ...
0
votes
0answers
17 views

Unique combination of columns regardless of order [duplicate]

I have a data frame with two columns and their order is meaningless. Therefore, in the data frame below, first and second rows mean the same thing and third and fourth rows mean the same thing. x <...
0
votes
1answer
26 views

DataGridView ConstraintException on row enter, Exception untraceable

I'm developing a win forms app, in which there is a DataGridView which has been binded to a DataTable. The DataTable has been applied unique constrain on its EAN field. When a new entry is made with ...
2
votes
2answers
39 views

For each unique ID, I would like to have only one row based on a ranking of another field

Ultimately, I am looking to create a table that contains each unique ID I have in my dataset with a corresponding field, based on a "ranking" of that field. I've been very stuck on this step. I have ...
0
votes
1answer
27 views

sorting in Excel with Rank Function in Group

hi, I would like to discuss on how to get sorting ascending formula from this case. Expected result is as shown in the picture in blue column. The only reference that can be used is Rank column (...
1
vote
1answer
25 views

How to count unique dates based on multiple or columns

Any suggestions welcome. Aims- I want to create a tally of how many unique dates each person worked, and a separate tally of how many blocks and toilets are built on each day in total and by a ...
1
vote
1answer
15 views

Store unique values from group to another column in Pandas

I have a problem with getting unique values from one column to another as value. df I have: id value1 valueNo 1 12 140 1 13 149 1 11 149 2 11 nan 2 11 150 3 ...
1
vote
0answers
27 views

Find rows with same elements (not caring about order) [duplicate]

If I have a dataframe with duplicated rows we can find out with duplicated. See here: a <- c(rep("A", 3)) b <- c("B", "B","C") df <-data.frame(a,b, stringsAsFactors = F) df a b 1 A B 2 A B ...
1
vote
1answer
46 views

FILTER has mismatched range sizes. Expected row count:

I have been using these 2 queries to fetch data in 2 different sheets =query('Raw Data'!A3:P62481,"select B, D, E, F, G, H, I, J, K, L, M, N, O, P where B = date '"&text($B$1,"yyyy-mm-dd")&"'"...
0
votes
1answer
42 views

Create conditional unique constraints on multiple columns

I need to create a conditional unique constraint on multiple columns using Oracle but I am failing to do so. Below is what I have right now but it's not working: Basically, my conditional unique ...
0
votes
1answer
40 views

Code to find unique elements gives duplicate elements due to different character-encoding

I have a text file with a list of repeated names (some of which have accented alphabets like é, à, î etc.) e.g. List: Précilia, Maggie, Précilia I need to write a code that will give an output of ...
1
vote
1answer
35 views

Removing duplicate values from a timeseries in MATLAB

I have a timeseries that looks like this: Time Data ------------- 802 1 803 2 803 3 804 7 I want to use interp(x,v,xq) with x as the time and v as the data, but that function ...
-1
votes
0answers
27 views

Programmatically creating a unique schedule for a given number of teams in multiple divisions

Example: Say you have 3 divisions with 4 teams in each divisions: Division 1: [Team 1, Team 2, Team 3, Team 4] Division 2: [Team 5, Team 6, Team 6, Team 8] Division 3: [Team 9, Team 10 Team 11, Team ...
0
votes
1answer
13 views

Reorganise data present in two columns so that columns are items in first column and rows are items in column 2 if grouped with item in first column

I have data such as following A 1 B 2 A 3 B 4 A 5 I want to get the following A B 1 2 3 4 5 A pivot table does not help, it gives me the following A B 1 2 3 4 5
0
votes
3answers
56 views

Selecting unique items in an array of objects [closed]

Assuming I have the following array of objects [{a:1,b:2,c:4}, {a:3,b:4,c:7}, {a:7,b:10,c:10}, {a:1, b:2,c:4}] How do I select the unique items in this array. I need to compare both fields (a, b ...
0
votes
2answers
44 views

Read large CSV in PowerShell parse multiple columns for unique values save results based on oldest value in column

I have a large 10 million row file (currently CSV). I need to read through the file, and remove duplicate items based on multiple columns. Example line of data would look something like: ...
0
votes
0answers
17 views

How to find unique entries in an array

I have a program that scans a large number of n by n matrices for rotations and mirror images. The output is a linear array that represents a flattened out lower triangular matrix with zeros and ones ...
1
vote
1answer
18 views

Different outcome using pandas nunique() and unique()

I have a big DF with 10 millions rows and I need to find the unique number for each column. I wrote the function below: (need to return a series) def count_unique_values(df): return pd.Series(df....
1
vote
1answer
40 views

Django only one user/one date in same model

I have a table that several users will add dates to. Each user can add a date. But you can only add that date once. How can I prevent a user from adding the same date more than once? Thanks in advance!...
-4
votes
3answers
44 views

How to remove duplicates in array by choosing which one to keep? [closed]

The problem I have a Javascript array that can contains duplicates (only 2) having same value for the key color. var array = [ { "id": "1", "color": "red", "animal": null ...
0
votes
3answers
25 views

Get only unique value in array by case sensative

I want unique array from an array by comparing all values to lower case or upper case so i can get perfect array.suppose you have two values in array like 'php developer' and 'Php Developer', both are ...
0
votes
0answers
6 views

How to retrieve unique values and all the NULLs but keep in it the exact order as it was in the table?

I have this column: the_date 2019-04-29 2019-04-29 NULL 2019-05-01 2019-05-01 2019-05-02 2019-05-02 NULL 2019-05-04 2019-05-04 Now I'd like to select unique but keep the NULLS, and keep the exact ...
0
votes
1answer
27 views

how to remove row which value were found in group before

I'm currently working on genomic data which contains chromosome start and end position. I want to identify the genomic region which overlap to another region and collapse them into new genomic region. ...
0
votes
0answers
22 views

Get the Index/reverse index of the unique values of dataframe DF using np.unique()

Here is the standard example that I would like to apply to a dataframe. Standard Example applied to an array with Desired output import numpy as np A = np.array([9,2,9,5]) C, ia, ic = np.unique(A, ...
1
vote
3answers
53 views

Remove IDs with fewer than 9 unique observations

I am trying to filter my data and remove IDs that have fewer than 9 unique month observations. I would also like to create a list of IDs that includes the count. I've tried using a few different ...
0
votes
4answers
35 views

How to update many rows with uniqid() making them unique in php

I created a new column in mysql, that is going to store a unique value for all of the elements inside the database. Now I would like to populate all rows with this unique value using uniqid(). But ...
0
votes
1answer
25 views

Unique name combos out of 2 files

I know similar questions have been asked quite a few times before but in all the research i did online all i was able to find was questions about getting unique combos from a single array and so on ...
0
votes
0answers
34 views

Optimizing code for grouping by unique person

I have a file with transactions. Each transaction includes person identifiers (which are sometimes/often missing) and transaction data. Person identifiers are fname, lname, phone, email and social ...
2
votes
0answers
33 views

The best way get unique identification number from virtual machines, which will be the same on the main machine

I try to find a unique ID, which will be the same as the virtual machine and the main machine. I tried using a monitor ID, bios number, but they can repeat for different end users. using (...
0
votes
0answers
12 views

How can i add id and password (unique link) to survey link created with ibm spss data collection professional/author?

I created a survey with ibm spss data collection professional/author. Survey link is like : http://survey.xxx.com/mrIWeb/index.htm?I.Project=TestSurvey I would like to add id and password to survey ...
-1
votes
1answer
96 views

Remove dublicate rows in long table using matlab

I have a table (800027x10) with column 1 containing timestamps of which some are identical like so 0 1 2 3 data0 3 data1 4 5 6 data2 6 data3 i would like to remove the double timestamps although ...
0
votes
0answers
14 views

MS Access generate unique id based on another column? [duplicate]

I have a first table in access which contains a primary key column (short text) and a text column (short text) for example ID Description ----------------- AZ Arizona FL Florida And i ...