題目描述AttributeError: module 'pandas' has no attribute 'DataFrame'題目來(lái)源及自己的思路編程遇到相關(guān)代碼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)你期待的結(jié)果是什么?實(shí)際看到的錯(cuò)誤信息又是什么?在網(wǎng)上搜過(guò)的解決方式都沒(méi)用,求各位大神解疑!
添加回答
舉報(bào)
0/150
提交
取消