updated script to no longer pass literal string to read_html using StringIO as behavior is to be deprecated soon in pandas

This commit is contained in:
xi-pinmping
2024-07-29 11:15:31 -04:00
parent 66d0ba5b72
commit 46a7f09488
6 changed files with 18 additions and 6 deletions
+3 -1
View File
@@ -17,7 +17,9 @@ def get_data():
}
# Get web data
r = requests.get(url, headers=header)
dfs = list(pd.read_html(r.text))
from io import StringIO
dfs = list(pd.read_html(StringIO(r.text)))
pd.set_option('display.max_rows', None)
# Specifies no max rows, otherwise only shows 10 records
df = pd.concat([dfs[0], salvaged], ignore_index=True)