python program
$10-30 USD
Оплачується при отриманні
Write python code to store mysql table columns in memory. There are two columns.
Upon a function call, search for the column1 or Column2 values. If a match found
return the column1 value.
Note: Cannot open a cursor for every fn call. I have a program already. The values should be stored as a list. Read from the list. Look for a match for that string ( either column1 or Column 2). If found,
return the list value ( only the column A).
Example:
column1 , column2
MAN MARCUS
DOLL BARBIE IS GOOD.
def MatchString(sentvalue)
If column1 in sentvalue or column2 in sentvalue
return column2
findout=MatchString ("Is barbie a doll?")
print (findout)
The result should be DOLL.
------------------------------- table and data-----------------------------------------
-------------------------
CREATE TABLE `string_source` (
`idnew_table` int(11) NOT NULL,
`column1` varchar(45) DEFAULT NULL,
`column2` varchar(100) DEFAULT NULL,
PRIMARY KEY (`idnew_table`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `string_source` (`idnew_table`,`column1`,`column2`) VALUES (1,'DOLL','BARBIE IS GOOD');
INSERT INTO `string_source` (`idnew_table`,`column1`,`column2`) VALUES (2,'MAN','MARCUS BOY');
Pseudo code for the function:
-----------------------------------------------
def MatchString(sentvalue)
loop list
If column1 is present in sentvalue
return column1 (for every match found append with comma as a delimiter)
else If column2 is present in sent value or even a close match
return column1 (for every match found append with comma as a delimiter)
( Basically at the end of completing the loop, you would return 3 possible values)
a) No match - ‘UNK’
b) One match – ‘COLUMN1’
c) Multiple matches – ‘COLUMN11’,’COLUMN12’
ID Проекту: #16007651
Про проект
14 фрілансерів(-и) готові виконати цю роботу у середньому за $22
I can code the Python program to return Column 1 or Column2 based on the input provided. The sql will read from the database and store the two columns in memory. Thanks
hi, I'm a python programmer, for 10 years. This job is looked quite easy for me. Relevant Skills and Experience 10 years python Proposed Milestones $20 USD - for all work
I once did a project similar to this while skydiving over Japan. Should be done pretty quickly!
It is quite simple to do with pandas. let me know if u need my service. Thank you. Relevant Skills and Experience Python, MySql, pandas Stay tuned, I'm still working on this proposal.
I have done this project few months ago.. I will do this project as soon as possible. Hire me immediately I will start working on it.. First Work will start on to planning on the project. We can make decisions on cha Більше