'How can I show Label output only from Transformers Pipeline - Sentiment Analysis [closed]

Picture of Output

From the picture, I've given the model a few sentences to analyse. The result from the analysis, I've added a new column to the dataframe called "sentiment".

As you can see, it gives the results in a list format with labels and scores.

What i'm trying to do is only add the Label result. i.e: "POSITIVE", "NEGATIVE", etc.. Is there a way of doing this?

Many thanks in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source