Let's say I have text data in a pandas data frame with multi-label.
Text Label
0 I love you A, B
1 Thank you C, D
2 You are welcome A, B, C
I wanted to convert it to a text file, where each row is the sentence and separated by label __label__
sign, and the each label is separated just by a space
Therefore, the text file will look like this:
I love you __label__ A B
Thank you __label__ C D
You are welcome __label__ A B C