Iterate through rows and create text for summarization model?

129 views Asked by At

I'm working with a dataframe that looks like this: enter image description here

I want to be able to iterate through the rows and have a new column called C that looks like enter image description here

I keep getting several of the same text about 2 times in each row instead of just one.

After that, I want to be able to run a summarization model from hugging face for each of the C values. For example

enter image description here

Each row has a summarization, the pipeline only takes strings and instead it's telling me it's in the wrong format.

`args[0]`: 0    happyugly1    sadprettyName: C, dtype: object have the wrong format. The should be either of type `str` or type `list`
0

There are 0 answers