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

Popular posts from this blog

Quotation marks to wrap an element in HTML

What is the difference between iostream and iostream.h in cpp?

The Basic Structure of a Full-Stack Web App