
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.



import pandas as pd
import requests
from bs4 import BeautifulSoup
url = 'https://finance.naver.com/item/main.njn?code=A051910'
# 웹 페이지에 HTML, 코드 가져오기
html = requests.get(url).text
# HTML 코드에서 테이블 데이터 가져오기
soup = BeautifulSoup(html, 'html.parser')
table = soup.find('table', {'class': 'tb_type1 tb_num tb_type1_ifrs'})
# 테이블 데이터를 데이터프레임으로 변환하기
df = pd.read_html(str(table))[0]
print(df)
