Demo entry 6719627

extract

   

Submitted by anonymous on Mar 13, 2018 at 07:17
Language: Python. Code size: 572 Bytes.

import csv
g = open('doc_new.csv','wb')
spamwriter = csv.writer(g, dialect='excel')
keyword = ['hybrid','dual',
           'multifunctional',
           'bifunctional',
           'bivalent',
           'fusion',
           'mixed',
           'multi',
           'adc',
           'linker',
           'conjugate']
with open('1.docs-all.csv') as f:
    reader = csv.reader(f)
    for row in reader:
        for word in keyword:
            if word in row[10].lower() or word in  row[13].lower():
                    spamwriter.writerow(row)
g.close()

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).