Skip to content

Commit ada3561

Browse files
Add files via upload
1 parent 0487f70 commit ada3561

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- coding: utf-8 -*-
2+
"""
3+
Created on Fri Dec 4 19:30:37 2020
4+
5+
@author: Tin
6+
"""
7+
import pandas as pd
8+
import requests
9+
from bs4 import BeautifulSoup
10+
11+
res = requests.get('https://finance.yahoo.com/quote/AMD/key-statistics?p=AMD')
12+
soup = BeautifulSoup(res.content,'lxml')
13+
table = soup.find_all('table')[0]
14+
df = pd.read_html(str(table))[0]
15+
16+
print(df)

0 commit comments

Comments
 (0)