python program

Në Vazhdim Postuar 6 vite mё parё Paguhet në dorëzim
Në Vazhdim Paguhet në dorëzim

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 Projekti: #16007651

Rreth projektit

14 propozimet Projekti në distancë Aktiv 6 vite mё parё

14 profesionistë freelancer dërguan një ofertë mesatare prej $22 për këtë punë

pkbsdmp

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

$25 USD për 1 ditë
(101 Përshtypje)
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 për 2 ditë
(16 Përshtypje)
4.3
ChafaaBouzerba

A proposal has not yet been provided

$30 USD për 1 ditë
(7 Përshtypje)
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 për 1 ditë
(0 Përshtypje)
0.0
levimalott

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

$30 USD për 1 ditë
(0 Përshtypje)
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 për 1 ditë
(0 Përshtypje)
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 Më shumë

$10 USD për 1 ditë
(0 Përshtypje)
0.0