Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Use python to complete the below using the provided data Labeled Disclosures. Please save python script and excel output. Disclosure type covid-specific If the cell for unique_sentences contains...

1 answer below »
Use python to complete the below using the provided data Labeled Disclosures. Please save python script and excel output.
    Disclosure type
    
    covid-specific
    If the cell for unique_sentences contains reference to “Covid-19” or “coronavirus,” then = “covid-specific.”
    general laundry list
    If the for unique_sentences cell does not contain “covid-19” or “coronavirus,” but contains no more than two of “public health,” “pandemic,” “epidemic,” “disease”, or “illness.”
    PH laundry list
    If the cell unique_sentences does not contain “covid-19” or “coronavirus,” but contains more than two of “public health,” “pandemic,” “epidemic,” “disease”, or “illness.”
Answered Same Day Feb 09, 2021

Solution

Aditya answered on Feb 10 2021
145 Votes
import csv
data = []
def countWords(line):
count = 0
if 'public health' in line:
count = count +1
if 'pandemic' in line:
count = count +1
if 'epidemic' in line:
count = count +1
if 'disease' in line:
count = count +1
if 'illness' in line:
count = count +1
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here