is there an efficient way to concatenate strings column-wise of multiple rows of a DataFrame such that the result is a single row whose value for each column is the concatenation of each value of the same column of all given rows?
Example
Combine the first four rows as explained above.
>>> df = pd.DataFrame([["this", "this"], ["is", "is"], ["a", "a"], ["test", "test"], ["ignore", "ignore"]])
>>> df
0 1
0 this this
1 is is
2 a a
3 test test
4 ignore ignore
Both accepted results:
0 1
0 this is a test this is a test
0
1 this is a test
2 this is a test