Added support for historical numbers dating back to 1992 in some cases
This commit is contained in:
1 parent
94a108b248
commit
26f84a9a7b
20 files changed
+36
-18
No files matched your search
@@ -6,6 +6,9 @@ from collections import Counter
|
||||
import csv
|
||||
|
||||
def get_data():
|
||||
df_old = pd.read_excel('./excel_lotto_records/daily4.xlsx')
|
||||
salvaged = df_old[['Date', 'Numbers']]
|
||||
|
||||
url = 'https://wvlottery.com/draw-games/daily-4/?game-analyze=daily-4&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",
|
||||
@@ -16,7 +19,7 @@ def get_data():
|
||||
dfs = pd.read_html(r.text)
|
||||
pd.set_option('display.max_rows', None)
|
||||
# Specifies no max rows, otherwise only shows 10 records
|
||||
df = dfs[0]
|
||||
df = dfs[0].append(salvaged, ignore_index=True)
|
||||
df2 = df[['Date', 'Numbers']]
|
||||
date = list(df2['Date'])
|
||||
nums = list(df2['Numbers'].astype('str'))
|
||||
@@ -41,7 +44,7 @@ total_freq = sum(frequency)
|
||||
Chance = frac(total_freq, 10000) # Chance = number call freq / all possible numbers i.e. 10000
|
||||
Winning_Numbers = str("-".join(sorted_nums))
|
||||
|
||||
#print(f"Likely numbers are . . . {Winning_Numbers}, \n"
|
||||
#print(f"Likely numbers are . . . {Winning_Numbers} \n"
|
||||
#f"With percent chance of winning being {Chance}")
|
||||
|
||||
d = dict(((k, eval (k)) for k in ('Winning_Numbers','Chance')))
|
||||
|
||||
Reference in new issue
Block a user