, (result['text']
) float
. ' '.join()
, , str.join()
.
Series.astype()
. , .tolist()
, str.join()
. -
result2 = Counter(" ".join(result['text'].astype(str)).split(" ")).items()
-
In [60]: df = pd.DataFrame([['blah'],['asd'],[10.1]],columns=['A'])
In [61]: df
Out[61]:
A
0 blah
1 asd
2 10.1
In [62]: ' '.join(df['A'])
TypeError Traceback (most recent call last)
<ipython-input-62-77e78c2ee142> in <module>()
TypeError: sequence item 2: expected str instance, float found
In [63]: ' '.join(df['A'].astype(str))
Out[63]: 'blah asd 10.1'