我的数据被提取到一个列表中。但不知道如何将该列表转换为数据框架。有任何方法我可以网络刮和直接获取数据到一个df?这是我的代码:import requestsfrom tabulate import tabulatefrom pandas import DataFrame
# GET the response from the web page
我试着从这个网站https://en.wikipedia.org/wiki/List_of_chemical_elements上找到“化学元素列表”的表格。然后,我希望将表数据存储到pandas数据帧中,以便可以将其转换为csv文件。到目前为止,我已经将表的头文件抓取并存储到一个数据帧中。我还设法从表中检索了每一行数据。但是,我在将表的数据存储到dataframe中时遇到了问题。下面是我到目前为止所得到的 from bs4 import BeautifulS