다양한 에러 처리
FutureWarning: Passing literal html to 'read_html' is deprecated and will be removed in a future version. To read from a literal string, wrap it in a 'StringIO' object.
- from
tables = pd.read_html(page.text)
- to
from io import StringIO
html_buffer = StringIO(page.text)
tables = pd.read_html(html_buffer)
FutureWarning: Series.getitem treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use
ser.iloc[pos]
for idx, r in tables[0].iterrows():
r[0]
- to
for idx, r in tables[0].iterrows():
r.iloc[0]