Python - excel export

前端 未结 2 1555
隐瞒了意图╮
隐瞒了意图╮ 2020-12-12 01:51

I\'ve got this code:

import pandas as pd
import requests
from bs4 import BeautifulSoup

res = requests.get(\"https://www.bankier.pl/gielda/notowania/akcje\")         


        
2条回答
  •  被撕碎了的回忆
    2020-12-12 02:17

    From the pandas.read_html documentation: Read HTML tables into a list of DataFrame objects.

    So, df is a list of dataframes. If you expect to only have one, it may be safe for you to use df[0].to_excel...

提交回复
热议问题