Python WordCloud meet AttributeError: 'list' object has no attribute 'items'
问题 When I using WordCloud function .fit_words(), I met AttributeError: 'list' object has no attribute 'items' . It also doesn't work when I using .generate_from_frequencies(). How to figure it out? All suggestion will be appreciated. code: wordcloud = WordCloud(font_path="simhei.ttf", background_color="white", max_font_size=80) word_frequence = {x[0]: x[1] for x in words_stat.head(1000).values} word_frequence_list = [] for key in word_frequence: temp = (key, word_frequence[key]) word_frequence