Picking rows with list of keywords

2019-07-26 04:44发布

I have two files like below. From File 1 and File 2, I need to create a dictionary.

File 1

procedure            code
anand database      321-87
Guy shiva network   321-123
jana audit          321-56

File 2

kalai has a recruitment group
shiva is the network guy in my office
he is the auditor in my audit office
anand is the database here
i bought a new phone and 1 kg of apple

Requirement

I need to pick rows from File 2 which contains all the keywords of each row in File 2 (procedure column) and if a row in File 2 has all the keywords, then map it to the code of that concern keywords with that picked procedure.

Expected output

S.No      procedure                          code
1    shiva is the network guy in my office  321-123
2    anand is the database here             321-87
3    i bought a red color apple             321-10

Can anyone help me out in this?

标签: python file
0条回答
登录 后发表回答