How can I eliminate “unsupported operand type(s) for -: ‘str’ and ‘str'” error as follows?

When I run the following code, def difference(dataset, interval=1): diff = list() for i in range(interval, len(dataset)): value = dataset[i] – dataset[i – interval] diff.append(value) return numpy.array(diff) series = read_csv(‘Houston_weather.csv’, header=None) X = series.values days_in_year = 365 differenced = difference(X, days_in_year) I get the following error, is there a way to eliminate it? I am…

Details

Trigger function onclick when loading HTML from external source

I’m loading HTML from an externally provided JSON file. There are links in the the HTML that are currently being parsed using ReactHTML. {FAQdata.FAQdata.questions.map((question, index) => <div className=”question-container” key={index} id={“question-“+index}> <h3 className=’font-weight–semi-bold’>{question.question}</h3> <p>{ReactHtmlParser(question.answer)}</p> </div> )} My client wants me to add analytics functions that trigger when the link is clicked. I’m trying to figure out…

Details