我试过这个,但它不起作用。DF包含一个1D列表,我必须使其成为熊猫数据帧以进行进一步处理。import pandas as pdimport numpy as npimport requestsurl = 'https://www.corona92.com/'header = { "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36", "X-Requested-With": "XMLHttpRequest"}r = requests.get(url, headers=header)df = pd.read_html(r.text)a = np.array(df).reshape(76,5)
添加回答
举报
0/150
提交
取消