Extract Tables from a Web Page in Python


import pandas as pd
xfiles = pd.read_html("https://en.wikipedia.org/wiki/List_of_The_X-Files_episodes")
print(xfiles) # prints all the tables on the page as list
print(type(xfiles))
print(len(xfiles))
print(xfiles[1]) # table of season 1
print(xfiles[12]) # table of season 10
Python

Comments

Popular posts from this blog

Quotation marks to wrap an element in HTML

Making GUI Calculator in Tkinter Python

Unlocking Web Design: A Guide to Mastering CSS Layout Modes