Pandas read_html results in TypeError

后端 未结 3 1885
耶瑟儿~
耶瑟儿~ 2021-01-14 06:02

I\'m using bs4 to parse a html page and extract a table, sample table given below and I\'m trying to load it into pandas but when i call pddataframe = pd.read_html(LOT

3条回答
  •  佛祖请我去吃肉
    2021-01-14 06:45

    Thanks for the pointers from all the suggested answers and comments, my rookie mistake was I had the table in a variable after extracting it using bs4. I was running pd.read_html(LOTable,skiprows=2, flavor='bs4') when I needed to run pd.read_html(LOTable.prettify(),skiprows=2, flavor='bs4')

提交回复
热议问题