Scrap table from wiki

Scarpping table from wiki and saving it to .csv with python is damn easy, Its just matter of ten line code,

Lets scrap table from two pages,

page1: https://en.wikipedia.org/wiki/Oncogene

page2: https://en.wikipedia.org/wiki/List_of_gene_prediction_software

1.png

Fig1: Table from page1

2.png

Fig2: Code for scrapping table from page1

3

Fig3: Dataframe created from scrapping data from page1

4.png

Fig4: Dataframe saved to csv file

Similarly table from page2 can be scrapped,

5.png

Fig5: Dataframe created from scrapping data from page1

6.png

Fig6: Dataframe saved to csv file

Advertisements

About YANAMALA VIJAY RAJ

Mtech in Clinical Eng Jointly offered by Indian institute of technology Madras& Christian medical college Vellore& Sree chitra tirunal institute for medical sciences and technology Trivandrum.
This entry was posted in Programming, Uncategorized and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s