我从一列df['Test'].head()
得到一个结果集:
0 [fed, official, say, weak, data, caused, weather, slow, taper]
1 [fed, 's, charles, plosser, see, high, bar, change, pace, tapering]
我希望将其转换为以下格式,并存储在与以下格式相同的列中:
fed official say weak data caused weather slow taper
fed 's Charles plosser see high bar change pace tapering
试试这个:
使用
.apply(" ".join)
例如:
输出:
因为你的单子格式不合适
首先我转换成单词列表,然后转换成字符串。你知道吗
代码:
输出:
相关问题 更多 >
编程相关推荐