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
Comments
Post a Comment
Write something to CodeWithAbdur!