python-3.x - 如何将输出显示为仅包含单词而不包含计数的列表?
问题描述
from nltk.corpus import stopwords
stopwords_list = stopwords.words('english')
token = [token for token in token if token not in stopwords_list]
token
freq6000 = []
Wrd_Freq = nltk.FreqDist(token)
Wrd_Freq
df_WrdFreq = pd.DataFrame.from_dict(Wrd_Freq, orient='Index')
df_WrdFreq.columns=['Word Frequency']
freq6000= df_WrdFreq[(df_WrdFreq('Word Frequency') >= 6000)]
TypeError Traceback (last last call last) in 13 14 ---> 15 freq6000= df_WrdFreq[(df_WrdFreq('Word Frequency') >= 6000)]
TypeError:“DataFrame”对象不可调用
解决方案
推荐阅读
- node.js - 复合模式同时任务
- sql - Query on how to replace numerical data from a string/column
- javascript - 由于缺少 .map 文件而收到警告
- javascript - 在地图函数中调用更新状态函数
- python - 将时间戳列表字符串转换为熊猫中的时间戳列表
- delphi - 在 Delphi 中实现跨平台的毫秒数
- microcontroller - 将 LCD Nokia 3310/5110 与微控制器 PIC16F877A 连接
- javascript - 使选取框文本在 HTML 中连续出现问题
- kubernetes-helm - helm 模板:如何捕获错误或异常?专门用于 getHostByName 函数调用
- javascript - Highchart 在条形图中针对每个类别显示单个条目