Questions tagged [matching]

For questions related to pattern matching, using character sequences or tree structures. In contrast to pattern recognition, the match described here usually has to be exact.

2735 questions
0
votes
1 answer

Awk - print matches and non matches in same file

I have two pretty large files each with 3 columns. Columns 1 and 2 are pairs and must both match to columns 1 and 2 in the second file (in the same order). If columns 1 and 2 from File 1 match in File 2 then print column 3 of File 2 next to column 3…
EA00
  • 633
  • 8
  • 19
0
votes
0 answers

Matching values in an iterative way in pandas

I have got a pandas dataframe including data from two different dataframes and I need to match and produce scores in an iterative way for each row based on their index (header) as in the image below. Is that possible in pandas? Any suggestion is…
ayan
  • 37
  • 4
0
votes
2 answers

Find matching id between multiple record in two table

I have the following table structure: table_book_user book_id | user_id --------+--------- b1 | u1 b3 | u1 b2 | u1 b4 | u2 b5 | u2 b5 | u3 table_book_collection book_id |…
hitech95
  • 55
  • 7
0
votes
1 answer

How do I search for a chunk of text and pull an element that matches out of a hash in Ruby?

I have a hash filled with 32 strings of the names and locations of NFL teams (e.g. "Baltimore Ravens", "Pittsburgh Steelers," etc.) I'm writing a class called def search which asks the user to enter the name of a team and then runs a while loop that…
Zack Shapiro
  • 6,648
  • 17
  • 83
  • 151
0
votes
2 answers

perl amino acid quiz in arrays

i'm learning perl, and i'm trying to write a program asks you to pick an amino acid and then keeps (randomly) guessing which amino acid you picked. I would like to do it with arrays. so I declare first in the subroutine an array with the letters im…
0
votes
1 answer

Compare 2 Text column of 2 Data frame by consecutive letter in R

I've the following 2 dataset: The original dataset and the matching dataset. The matching dataset is used to match against the original dataset. Original…
Luther_Proton
  • 348
  • 1
  • 7
0
votes
0 answers

Keep data in that is +/- 1 hour matching with date and site ID between 2 data frames in R

I have 2 tables (data1 and data2). My goal is to keep data in data2 that matches with "Site" and "Date" in data1 and also is within +/- 1 hour of data1. I have an example of what I am looking for below: data1 <- data.frame("Site" = c("ABC", "ABC",…
Sarah
  • 411
  • 4
  • 14
0
votes
3 answers

Excel Function Counting Cells with Criteria

I new at using Excel and need help. I have a sheet that contains operations and headers that represent names but for confidentiality it is letters. What I am trying to do is find the max,min within each operation(rows) between A - O and avoiding the…
0
votes
1 answer

Shell string pattern matching : var="this is a test"; echo ${var#t?st} match nothing

I am studying bash shell scripting. var="this is a test"; echo ${var#t?st} or var="this is a test"; echo ${var#test} result this is a test I know that hashnet will delete the shortest or longest matching string. If the pattern is 'test' then the…
jisu choi
  • 25
  • 5
0
votes
1 answer

How to specify a path with exclusions in yaml

I'm relatively new to yaml and have some azure pipelines to maintain. The variable below is used to run unit tests in azure DevOps but there has now been added a test project named Api.Tests.RestSharp which I wish to be excluded from being…
atamata
  • 997
  • 3
  • 14
  • 32
0
votes
2 answers

Python: Efficient way of matching slices of strings between two lists

Let's say I have two lists of files with similar names like so: images = ['image_im_1', 'image_im_2'] masks = ['mask_im_1', 'mask_im_2', 'mask_im_3'] How would I be able to efficiently remove elements that aren't matching? I want to get the…
ChilliMayoo
  • 69
  • 1
  • 6
0
votes
1 answer

How can I find matches in two arrays with dictionaries in them?

I have the following problem. I want to compare two lists with dictionaries and find matches. Schema List A: [ { authorID: string, articleID: string } ] Schema List B: [ { authorID: string, firstName: string, lastName:…
0
votes
1 answer

Add column to data frame to match geographic coordinates with location name

I have a data frame (df1) containing millions of rows of bike ride data for a bike share company. There are 17 columns, but I'm only interested in all data under four columns. loc_id ride_type lat lng Each location ID on df1 has a matching…
Alvin
  • 3
  • 3
0
votes
2 answers

How to compare a list to a column in a data frame and print all rows where the list matches the column

I have a data frame where one of the columns lists the gene my genetic mutations are associated with (last column). 0 chr1 6667742 T TTC HIGH frameshift_variant DNAJC11 1 chr1 8360467 G GC …
kshaff
  • 1
  • 1
0
votes
0 answers

search data structure with custom distance on histograms

I have a list of k-dimensional features M. I want to find in this list the nearest item to a query feature A. Feature comparison is not directly based on a common metric (such as Euclidean or Symmetric Chi2). Rather, the comparison between feature A…
1 2 3
99
100