From da99a95fd83f364247737e8f411fa53f14be943d Mon Sep 17 00:00:00 2001 From: xi-pinmping Date: Sun, 21 May 2023 23:45:15 -0400 Subject: [PATCH] pandas issue fix, formatting fixes --- c25_ans.csv | 2 +- cash25.py | 2 +- d3_ans.csv | 2 +- d4_ans.csv | 2 +- daily3.py | 2 +- daily4.py | 2 +- la_ans.csv | 2 +- lotto_america.py | 8 +++----- lottopy_pb.py | 2 +- megamil.py | 2 +- mm_ans.csv | 2 +- pb_ans.csv | 2 +- 12 files changed, 14 insertions(+), 16 deletions(-) diff --git a/c25_ans.csv b/c25_ans.csv index c498e3a..0f656c1 100644 --- a/c25_ans.csv +++ b/c25_ans.csv @@ -1,2 +1,2 @@ Forecast,Chance -6-14-15-16-18-22,31/16100 +3 - 6 - 14 - 18 - 20 - 25,71/35420 diff --git a/cash25.py b/cash25.py index 04a5467..0f92f83 100755 --- a/cash25.py +++ b/cash25.py @@ -43,7 +43,7 @@ for n in range(0, 25): sorted_nums = sorted(likely_nums, key=lambda x: (len(x), x)) total_freq = sum(frequency) Chance = frac(total_freq, 177100) # Chance = number call freq / all possible numbers i.e. 177100 -Forecast = str("-".join(sorted_nums)) +Forecast = str(" - ".join(sorted_nums)) #print(f"Likely numbers are . . . {Forecast} \n" #f"With percent chance of winning being {Chance}") diff --git a/d3_ans.csv b/d3_ans.csv index 76b6d41..a77cda9 100644 --- a/d3_ans.csv +++ b/d3_ans.csv @@ -1,2 +1,2 @@ Forecast,Chance -2-3-6,171/250 +2 - 3 - 6,10379/15000 diff --git a/d4_ans.csv b/d4_ans.csv index 87d7ea6..97d0c53 100644 --- a/d4_ans.csv +++ b/d4_ans.csv @@ -1,2 +1,2 @@ Forecast,Chance -3-4-8-9,33/625 +1 - 3 - 4 - 8,137/2500 diff --git a/daily3.py b/daily3.py index 680344a..cffa5d4 100755 --- a/daily3.py +++ b/daily3.py @@ -39,7 +39,7 @@ for n in range(0, 10): sorted_nums = sorted(likely_nums, key=lambda x: (len(x), x)) total_freq = sum(frequency) Chance = frac(total_freq, 15000) # Chance = number call freq / all possible numbers i.e. 1000 -Forecast = str("-".join(sorted_nums)) +Forecast = str(" - ".join(sorted_nums)) #print(f"Likely numbers are . . . {Forecast} \n" #f"With percent chance of winning being {Chance}") diff --git a/daily4.py b/daily4.py index 7400a89..641c8d1 100755 --- a/daily4.py +++ b/daily4.py @@ -42,7 +42,7 @@ for n in range(0, 9): sorted_nums = sorted(likely_nums, key=lambda x: (len(x), x)) total_freq = sum(frequency) Chance = frac(total_freq, 10000) # Chance = number call freq / all possible numbers i.e. 10000 -Forecast = str("-".join(sorted_nums)) +Forecast = str(" - ".join(sorted_nums)) #print(f"Likely numbers are . . . {Forecast} \n" #f"With percent chance of winning being {Chance}") diff --git a/la_ans.csv b/la_ans.csv index c1c5c04..6dc7685 100644 --- a/la_ans.csv +++ b/la_ans.csv @@ -1,2 +1,2 @@ Forecast,SB,Chance -1-29-32-48-52,[2],149/25989600 +14 - 17 - 32 - 48 - 52,[10],79/12994800 diff --git a/lotto_america.py b/lotto_america.py index b1fa023..5ea7288 100755 --- a/lotto_america.py +++ b/lotto_america.py @@ -12,13 +12,11 @@ def get_data(): url = 'https://wvlottery.com/draw-games/lotto-america/?game-analyze=lotto-america&what-to-search=historysearch&date-range=-1' header = { - "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36", - "X-Requeste, 'PPX', 'Winners WV Only', 'Payout WV Onlyd-With": "XMLHttpRequest" + "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/113.0", } # Get web data - r = requests.get(url, headers=header) - dfs = list(pd.read_html(r.text)) + dfs = list(pd.read_html(requests.get(url, headers=header).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) @@ -50,7 +48,7 @@ for n in range(0, 10): sorted_nums = sorted(likely_nums, key=lambda x: (len(x), x)) total_freq = sum(frequency + frequency_sb) Chance = frac(total_freq, 25989600) # Chance = number call freq / all possible numbers i.e. 25,989,600 -Forecast = str("-".join(sorted_nums)) +Forecast = str(" - ".join(sorted_nums)) #print(f"Likely numbers are . . . {Forecast} SB: {SB}\n" #f"With percent chance of winning being {Chance}") diff --git a/lottopy_pb.py b/lottopy_pb.py index 155388d..ec87e1d 100755 --- a/lottopy_pb.py +++ b/lottopy_pb.py @@ -48,7 +48,7 @@ for n in range(0, 26): sorted_nums = sorted(likely_nums, key=lambda x: (len(x), x)) total_freq = sum(frequency + frequency_pb) Chance = frac(total_freq, 292201338) # Chance = number call freq / all possible numbers i.e. 292201338 -Forecast = str("-".join(sorted_nums)) +Forecast = str(" - ".join(sorted_nums)) #print(f"Likely numbers are . . . {Forecast} PB: {PB}\n" #f"With percent chance of winning being {Chance}") diff --git a/megamil.py b/megamil.py index af90339..67af8a9 100755 --- a/megamil.py +++ b/megamil.py @@ -50,7 +50,7 @@ for n in range(0, 25): sorted_nums = sorted(likely_nums, key=lambda x: (len(x), x)) total_freq = sum(frequency + frequency_mb) Chance = frac(total_freq, 302575350) # Chance = number call freq / all possible numbers i.e. 11238513 -Forecast = str("-".join(sorted_nums)) +Forecast = str(" - ".join(sorted_nums)) #print(f"Likely numbers are . . . {Forecast} MB: {MB}\n" #f"With percent chance of winning being {Chance}") diff --git a/mm_ans.csv b/mm_ans.csv index 734e160..e191b98 100644 --- a/mm_ans.csv +++ b/mm_ans.csv @@ -1,2 +1,2 @@ Forecast,MB,Chance -3-7-15-38-64,[9],64/151287675 +1 - 15 - 29 - 38 - 46,[9],2/4584475 diff --git a/pb_ans.csv b/pb_ans.csv index 6a0a091..e9a8a4d 100644 --- a/pb_ans.csv +++ b/pb_ans.csv @@ -1,2 +1,2 @@ Forecast,PB,Chance -6-33-36-37-56,[18],1/1453738 +19 - 36 - 37 - 47 - 58,[18],5/7492342