From ec344696637a8820daa3cca47bac89aaa657f786 Mon Sep 17 00:00:00 2001 From: xi-pinmping Date: Mon, 29 Jul 2024 11:18:51 -0400 Subject: [PATCH] updated script to no longer pass literal string to read_html using StringIO as behavior is to be deprecated soon in pandas --- lottopy_pb.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lottopy_pb.py b/lottopy_pb.py index e716908..beea272 100755 --- a/lottopy_pb.py +++ b/lottopy_pb.py @@ -3,6 +3,8 @@ from fractions import Fraction as frac import pandas as pd import requests from collections import Counter +from io import StringIO + def get_data(): # previous records which have since been removed from wvlottery.com's database @@ -17,7 +19,6 @@ def get_data(): } # Get web data r = requests.get(url, headers=header) - from io import StringIO dfs = list(pd.read_html(StringIO(r.text))) pd.set_option('display.max_rows', None)