微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

pyldavis AttributeError: 'DataFrame' 对象没有属性 'ix'

如何解决pyldavis AttributeError: 'DataFrame' 对象没有属性 'ix'

当我尝试运行时出现此错误

vis = pyLDAvis.gensim.prepare(lda_model,corpus,dictionary=lda_model.id2word)

vis

    385    # reorder all data based on new ordering of topics
    386    topic_freq       = topic_freq[topic_order]
--> 387    topic_term_dists = topic_term_dists.ix[topic_order]
    388    doc_topic_dists  = doc_topic_dists[topic_order]
    
AttributeError: 'DataFrame' object has no attribute 'ix'

It seems to be an issue with pyLDAvis and pandas
pyLDAvis 2.1.1
pandas 1.1.3

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。