python program

В роботі Опубліковано %project.relative_time Оплачується при отриманні
В роботі Оплачується при отриманні

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’

MySQL Python

ID Проекту: #16007651

Про проект

14 заявок(-ки) Дистанційний проект Остання активність 6 роки(ів) тому

14 фрілансерів(-и) готові виконати цю роботу у середньому за $22

pkbsdmp

I have good experience in Python and MySQL.. Please refer to my profile

$25 USD за 1 день
(101 відгуків(и))
6.6
ksab

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

$20 USD за 2 дні(-в)
(16 відгуків(и))
4.3
ChafaaBouzerba

A proposal has not yet been provided

$30 USD за 1 день
(7 відгуків(и))
3.3
yuelang85

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

$20 USD за 1 день
(0 відгуків(и))
0.0
levimalott

I once did a project similar to this while skydiving over Japan. Should be done pretty quickly!

$30 USD за 1 день
(0 відгуків(и))
0.0
cybermax8

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.

$15 USD за 1 день
(0 відгуків(и))
0.0
musadiqmusa

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 Більше

$10 USD за 1 день
(0 відгуків(и))
0.0