From e15eff3bc1c6c96182d6f4f512f77081f66f8770 Mon Sep 17 00:00:00 2001 From: lottopy Date: Tue, 27 Dec 2022 14:21:12 -0500 Subject: [PATCH] replaced append with concat --- cash25.py | 4 ++-- daily4.py | 4 ++-- lotto_america.py | 4 ++-- lottopy_pb.py | 4 ++-- megamil.py | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cash25.py b/cash25.py index 61bf5d8..dda91e1 100755 --- a/cash25.py +++ b/cash25.py @@ -17,10 +17,10 @@ def get_data(): # Get web data r = requests.get(url, headers=header) - dfs = pd.read_html(r.text) + dfs = list(pd.read_html(r.text)) pd.set_option('display.max_rows', None) # Specifies no max rows, otherwise only shows 10 records - df = dfs[0].append(salvaged, ignore_index=True) + df = pd.concat([dfs[0], salvaged], ignore_index=True) df2 = df[['Date', 'Numbers']] date = list(df2['Date']) nums = list(df2['Numbers'].astype('str')) diff --git a/daily4.py b/daily4.py index 9fa504c..df16061 100755 --- a/daily4.py +++ b/daily4.py @@ -16,10 +16,10 @@ def get_data(): } # Get web data r = requests.get(url, headers=header) - dfs = pd.read_html(r.text) + dfs = list(pd.read_html(r.text)) pd.set_option('display.max_rows', None) # Specifies no max rows, otherwise only shows 10 records - df = dfs[0].append(salvaged, ignore_index=True) + df = pd.concat([dfs[0], salvaged], ignore_index=True) df2 = df[['Date', 'Numbers']] date = list(df2['Date']) nums = list(df2['Numbers'].astype('str')) diff --git a/lotto_america.py b/lotto_america.py index c826c58..aef9154 100755 --- a/lotto_america.py +++ b/lotto_america.py @@ -16,10 +16,10 @@ def get_data(): # Get web data r = requests.get(url, headers=header) - dfs = pd.read_html(r.text) + dfs = list(pd.read_html(r.text)) pd.set_option('display.max_rows', None) # Specifies no max rows, otherwise only shows 10 records - df = dfs[0].append(salvaged, ignore_index=True) + df = pd.concat([dfs[0], salvaged], ignore_index=True) df2 = df[['Date', 'Numbers', 'SB', 'All Star']] date = list(df2['Date']) nums = list(df2['Numbers'].astype('str')) diff --git a/lottopy_pb.py b/lottopy_pb.py index 2f03ca3..fcff1cd 100755 --- a/lottopy_pb.py +++ b/lottopy_pb.py @@ -17,10 +17,10 @@ def get_data(): } # Get web data r = requests.get(url, headers=header) - dfs = pd.read_html(r.text) + dfs = list(pd.read_html(r.text)) pd.set_option('display.max_rows', None) # Specifies no max rows, otherwise only shows 10 records - df = dfs[0].append(salvaged, ignore_index=True) + df = pd.concat([dfs[0], salvaged], ignore_index=True) df2 = df[['Date', 'Numbers', 'PB', 'PPX', 'Winners WV Only', 'Payout WV Only']] date = list(df2['Date']) nums = list(df2['Numbers'].astype('str')) diff --git a/megamil.py b/megamil.py index 8f16910..54a4415 100755 --- a/megamil.py +++ b/megamil.py @@ -17,10 +17,10 @@ def get_data(): # Get web data r = requests.get(url, headers=header) - dfs = pd.read_html(r.text) + dfs = list(pd.read_html(r.text)) pd.set_option('display.max_rows', None) # Specifies no max rows, otherwise only shows 10 records - df = dfs[0].append(salvaged, ignore_index=True) + df = pd.concat([dfs[0], salvaged], ignore_index=True) df2 = df[['Date', 'Numbers', 'MB', 'MP']] date = list(df2['Date']) nums = list(df2['Numbers'].astype('str'))