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
2 answers

How can I map multiple row entries in df1 (name, category, amount) to one row entry per name under the respective category columns of another df2?

A first dataframe has a column containing categories which are the same as the headers of the second. There are multiple row entries for one name in df1. df2 will have 1 row entry per name. df1 has 1 row entry per category per name. All rows for one…
0
votes
0 answers

vlookup/index(+match) alternative in pandas df

Well. In this thread, answers are needed only if you have a faster solution to this case =) I have a dataframe that has the following columns - status (contains the values "ok" and "not_responding"), a concat column (contains a concatenated value…
7Ns
  • 11
  • 1
0
votes
1 answer

Shorten MQTT topic filtering function

I wrote the following logic function, but I am sure it is possible to write it (way) shorter. In case you are unfamiliar with MQTT wildcards, you can read up on them here. self is the topic we are "subscribed" to, containing zero or more wildcards.…
GSerum_
  • 57
  • 8
0
votes
0 answers

String Matching on single Words

I have asked a question before regarding string matching in Word2Vec. I would now be interested if there are other ways to match single words in a Dataframe. BSP: sieve pressure spring SIEVE case socket and so on I already tried the simple String…
Nick Stankat
  • 11
  • 1
  • 3
0
votes
1 answer

need to identify value using two other columns

I have a dataframe called data that looks like this: org_id commit_date commit_amt 123 2020-06-01 50000 123 2020-06-01 50000 123 2021-06-01 60000 234 2019-07-01 30000 234 2020-07-01 40000 234 2021-07-01 50000 I want the…
0
votes
1 answer

Match based on column in dataframe

| response | Account_Number | report_Length | | --------------------------- | -------------- | ------------- | | [1670] | 1670 | [91] | | [7910, 8329] | …
Swetha
  • 99
  • 1
  • 1
  • 11
0
votes
1 answer

Run SURF algorithm on colab

I used to run SURF and SIFT on Colab using OpenCV 3.4.2.17. However, I can not use this version of opencv any more. Is there any other way to run SURF on Colab? I can SIFT pantent has expired since 2020. Below is the error error: OpenCV(4.6.0)…
0
votes
0 answers

Lua substring with word part (protection/skip)

Need help with function, which will used like string.sub, but will save color part of string -- namespaces: local stringf; -- @class stringf -- @desc string helper functions stringf = {}; do -- @private local str = "\affffffffSample…
qhouz
  • 23
  • 4
0
votes
0 answers

How to deal with fuzzy matching cascades/collapse/chains

I have to implement a fuzzy matching solution for a client and am going to use Damerau-Levenshtein for that. So far so good, but I'm concerned about cascades/collapse/chains, or however you would like to call it where A matches B, and B matches C,…
JanB
  • 1
0
votes
3 answers

Compiling C++ Code With Boost's regex_match

Given this code: #include #include #include #include #include using namespace std; using namespace boost; int main ( int arg_count, char *arg_vec[] ) { if (arg_count !=2 ) { …
neversaint
  • 60,904
  • 137
  • 310
  • 477
0
votes
1 answer

MongoDB match document's array element based on condition defined in the element's value

I have a MongoDB (v6.0.3) document in my database: { "user": "123", "alerts": [ { "alertDirection": "$gte", "alertValue": 9999, "location": "home", "available": false, "position": 28 }, { …
errata
  • 5,695
  • 10
  • 54
  • 99
0
votes
0 answers

How to communicate between order placing system and trade matching system

Order Placing System A user places an order and the corresponding amount is kept on hold for the order and an order is created. This order is then pushed to some queue to be used by trade matching system. User gets back a reference order id for the…
Prashant Singh
  • 3,725
  • 12
  • 62
  • 106
0
votes
2 answers

How to identify date within a specific range from multiple columns of a dataframe in R?

I have a very large dataframe with > 300 date columns (and >100,000 rows). Each row also contains an 'index date'. For each row, I want to identify whether any of the subsequent date columns contain a date which is within 6 months of the index date.…
Naomi
  • 15
  • 3
0
votes
0 answers

Can I use python structured unpacking to do general type checking?

I am reading that Python matching can do type-checking. def sum_two_integers(num1, num2): match num1, num2: case int(num1), int(num2): return num1 + num2 case _: # Wrong type Is it possible to write a decorator…
0
votes
0 answers

Least-Worst name data matching method between 1) a list of full names, and 2) a list of last names and first initials

For reasons outside my of control, I am sadly responsible for attempting to match two generally incompatible datasets. I was hoping for some advice and refinement on my current strategy, or a proposal for something entirely different. Problem I have…