ROW CONCATENATION LOGIC IN PYTHON (PANDAS DATAFRAME) : In the below mentioned table, concatenate the rows which has column "Sentence" with distinct values in another table.

       `Tri_gram_sents                   Value          sentence
      (('<s>', '<s>'), 'ABC')          0.161681         1
      (('<s>', 'ABC'), 'ABC')          0.472973         1
      (('ABC', 'ABC'), 'ABC')          0.305732         1
      (('ABC', 'ABC'), 'ABC')          0.005655         1
      (('ABC', 'ABC'), '</s>')         0.434783         1
      (('ABC', '</s>'), '</s>')        0.008547         1
      (('<s>', '<s>'), 'DEF')          0.111111         2
      (('<s>', 'DEF'), 'DEF')          0.039474         2
      (('DEF', 'DEF'), 'DEF')          0.207317         2
      (('DEF', 'DEF'), 'DEF')          0.074803         2
      (('DEF', 'DEF'), '</s>')         0.037940         2
      (('DEF', '</s>'), '</s>')        0.033163         2
      (('<s>', '<s>'), 'GHI')          0.250000         3
      (('<s>', 'GHI'), 'GHI')          0.103316         3
      (('GHI', 'GHI'), 'GHI')          0.024155         3
      (('GHI', 'GHI'), '</s>')         0.028302         3
      (('GHI', '</s>'), '</s>')        0.117647         3    `

 1. For below set of rows, i will get a total of 3 rows in another table by combining all rows in a single row with column "sentence" as reference "1", "2", "3"

`my output in this manner`

        (('<s>', '<s>'), 'ABC') 0.161681/(('<s>', 'ABC'), 'ABC') 0.472973/(('ABC', 'ABC'), 'ABC') 0.305732/(('ABC', 'ABC'), 'ABC') 0.005655/(('ABC', 'ABC'), '</s>') 0.434783/(('ABC', '</s>'), '</s>') 0.008547
        (('<s>', '<s>'), 'DEF') 0.111111/(('<s>', 'DEF'), 'DEF') 0.039474/(('DEF', 'DEF'), 'DEF') 0.207317/(('DEF', 'DEF'), 'DEF') 0.074803/(('DEF', 'DEF'), '</s>') 0.037940/(('DEF', '</s>'), '</s>') 0.033163
        (('<s>', '<s>'), 'GHI') 0.250000/(('<s>', 'GHI'), 'GHI') 0.103316/(('GHI', 'GHI'), 'GHI') 0.024155/(('GHI', 'GHI'), '</s>') 0.028302/(('GHI', '</s>'), '</s>') 0.117647


    
    