Intro
[1]:
import takco
import requests
from IPython.display import HTML, display
url = 'https://simple.wikipedia.org/wiki/David_Beckham'
html = requests.get(url).text
page = takco.extract.Page(url, html, about=None)
tables = takco.TableSet.extract(source = [page])
for table in tables:
display(table)
WARNING:root:Failed to load Elasticsearch
ERROR:root:Cannot import DAWG
ERROR:root:Cannot import datasketch / numpy / pandas
ERROR:root:Cannot import faiss/pandas/numpy
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | |
0 | Manchester United | 1992–93 | FA Premier League | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
1 | Manchester United | 1993–94 | FA Premier League | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2 | Preston North End (loan) | 1994–95 | Third Division | 5 | 2 | 0 | 0 | 0 | 0 | – | – | 0 | 0 | 5 | 2 |
3 | Manchester United | 1994–95 | FA Premier League | 4 | 0 | 2 | 0 | 3 | 0 | 1 | 1 | 0 | 0 | 10 | 1 |
4 | Manchester United | 1995–96 | FA Premier League | 33 | 7 | 3 | 1 | 2 | 0 | 2 | 0 | 0 | 0 | 40 | 8 |
0 | 1 | 2 | |
---|---|---|---|
Year | Apps | Goals | |
0 | 1996 | 3 | 0 |
1 | 1997 | 9 | 0 |
2 | 1998 | 8 | 1 |
3 | 1999 | 7 | 0 |
4 | 2000 | 10 | 0 |
[2]:
from IPython.display import Markdown, display
from takco.link import MediaWikiAPI
uri = MediaWikiAPI().lookup_title('David_Beckham')
Markdown(f" {uri} ")
[ ]: