How do I keep the row labels in a data frame when when converting the dataframe into a corpus?

Viewed 32

my data frame

                Column1 | Comment
Row1 is labeled    A      Some comments added
Row2 is labeled    B      Some comments added here
Row3 is labeled    C      Some comments added here as well

Here is when I set the corupus

corpus = Corpus(VectorSource(df$Comment))

my result removes "Row1 is labeled", "Row2 is labeled" instead it becomes 1,2,3 and so on. I would like it to keep its row label that I assigned.

0 Answers
Related