In python pandas there is a Series / dataframe column of str values to combine into one long row:
df = pd.DataFrame({'text' : pd.Series(['Hello', 'world', '!'], index=['a', 'b', 'c'])})
Goal: "Hello world!"
Until now, methods such as df['text'].apply(lambda x: ' '.join(x))that have returned only the Series.
What is the best way to get to the concatenated target string?
source
share