1

I have this dataframe dataframe

and I wish to put each word in the most_used_words_tweet column in a separate row and it will have the same value in the hate column

example: "desired output (2nd row is split to two rows)"

     |hate | most_used_words_tweet |
0    |0    |                   اليهود |
1    |0    |                   اليهود |
2    |0    |                     الله |
3    |1    |                   اليهود |
...
  • https://stackoverflow.com/questions/37333299/splitting-a-pandas-dataframe-column-by-delimiter splits into colums ... lets see if I find one that does rows. – Patrick Artner Jun 22 '21 at 05:45
  • Possible duplicate of [split-explode-pandas-dataframe-string-entry-to-separate-rows/52973916#52973916](https://stackoverflow.com/questions/12680754/split-explode-pandas-dataframe-string-entry-to-separate-rows/52973916#52973916) – Patrick Artner Jun 22 '21 at 05:47
  • The split word order is from right to left ? I seen the order of the 2nd row words presented in reverse order – SeaBean Jun 22 '21 at 05:51
  • @SeaBean Arabic text goes from right to left, but the order doesn't matter – Imene KOLLI Jun 22 '21 at 05:53
  • If you require the words presented in order from right to left, this may be a reason not to mark this question as duplicate. – SeaBean Jun 22 '21 at 05:56

0 Answers0