对datafrmae某一列进行分词,并对分词后的所有字符串进行统计

import pandas as pd
import jieba

def cut_word(word):
	cw = jieba.cut(word)
    return list(cw)

df['cut_word'] = df['word'].apply(cut_word)

pd.Series(df['cut_word'].sum()).value_counts()

你可能感兴趣的:(pandas)