<Python, pandas> 複数カラムの各要素の文字列の値をそれぞれ結合する。

複数カラムcolumnの各要素each elementの文字列の値string valueを、 それぞれ結合する。 In [86]: df5 Out[86]: a b c 0 1 2 5 1 2 4 hoge 2 3 6 8 3 4 8 9 4 5 10 10 In [87]: df5['d'] = df5[['a','b']].apply(lambda x: '_'.join(x), axis=1) ----------------------------------------------------------------------…