Extracting data from HTML table

前端 未结 7 756
迷失自我
迷失自我 2020-12-04 15:41

I am looking for a way to get certain info from HTML in linux shell environment.

This is bit that I\'m interested in :

7条回答
  •  爱一瞬间的悲伤
    2020-12-04 16:23

    Use pandas.read_html:

    import pandas as pd
    html_tables = pd.read_html('resources/test.html')
    df = html_tables[0]
    df.T # transpose to align
                       0
    Tests            103
    Failures          24
    Success Rate  76.70%
    Average Time   71 ms
    

提交回复
热议问题