AttributeError: module 'pandas' has no attribute 'DataFrame'
编程遇到
import requests from lxml import etree url = 'https://book.douban.com/subject/1084336/comments/'r = requests.get(url).texts = etree.HTML(r) file = s.xpath('//div[@class="comment"]/p/span/text()')import pandas as pd df = pd.DataFrame(file) df.to_excel(pinglun.xlsx)
在网上搜过的解决方式都没用,求各位大神解疑!
相关分类