2.4 · Challenge

Find the most negative headline

In this challenge, you will write sentiment.mostNegative, an aggregation function that returns the text with the lowest compound score from a group of rows, and use it to find the most negative headline for each stock.

If you did not complete the previous challenges, run these commands to reach the starting state. The first command copies the finished sentiment.label and sentiment.score functions and the procedure into your project: