I have the following dataframe in python: enter image description here
I would like to convert from word ok(index = 0) to something(index =24) into one sentence based on end_sentence column value which is 1 to indicate end of a sentence. Similar from Night(index=25) to significant (index=41) into another sentence