题目描述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)你期待的结果是什么?实际看到的错误信息又是什么?在网上搜过的解决方式都没用,求各位大神解疑!
添加回答
举报
0/150
提交
取消