replaced append with concat
This commit is contained in:
1 parent
2b7f1abfff
commit
a7f8ff61a2
12 files changed
+47
-47
No files matched your search
+2
-2
@@ -1,2 +1,2 @@
|
|||||||
Winning_Numbers,Chance
|
Forecast,Chance
|
||||||
14-16-18-2-22-9,171/88550
|
14-15-16-22-25-6,17/8855
|
||||||
|
@@ -17,10 +17,10 @@ def get_data():
|
|||||||
|
|
||||||
# Get web data
|
# Get web data
|
||||||
r = requests.get(url, headers=header)
|
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)
|
pd.set_option('display.max_rows', None)
|
||||||
# Specifies no max rows, otherwise only shows 10 records
|
# 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']]
|
df2 = df[['Date', 'Numbers']]
|
||||||
date = list(df2['Date'])
|
date = list(df2['Date'])
|
||||||
nums = list(df2['Numbers'].astype('str'))
|
nums = list(df2['Numbers'].astype('str'))
|
||||||
@@ -43,13 +43,13 @@ for n in range(0, 25):
|
|||||||
sorted_nums = sorted(likely_nums)
|
sorted_nums = sorted(likely_nums)
|
||||||
total_freq = sum(frequency)
|
total_freq = sum(frequency)
|
||||||
Chance = frac(total_freq, 177100) # Chance = number call freq / all possible numbers i.e. 177100
|
Chance = frac(total_freq, 177100) # Chance = number call freq / all possible numbers i.e. 177100
|
||||||
Winning_Numbers = str("-".join(sorted_nums))
|
Forecast = str("-".join(sorted_nums))
|
||||||
|
|
||||||
#print(f"Likely numbers are . . . {Winning_Numbers} \n"
|
#print(f"Likely numbers are . . . {Forecast} \n"
|
||||||
#f"With percent chance of winning being {Chance}")
|
#f"With percent chance of winning being {Chance}")
|
||||||
|
|
||||||
d = dict(((k, eval (k)) for k in ('Winning_Numbers','Chance')))
|
d = dict(((k, eval (k)) for k in ('Forecast','Chance')))
|
||||||
h = 'Winning_Numbers', 'Chance'
|
h = 'Forecast', 'Chance'
|
||||||
f = open('c25_ans.csv', 'w', encoding='utf_8')
|
f = open('c25_ans.csv', 'w', encoding='utf_8')
|
||||||
writer = csv.DictWriter(f, fieldnames=h)
|
writer = csv.DictWriter(f, fieldnames=h)
|
||||||
writer.writeheader()
|
writer.writeheader()
|
||||||
|
|||||||
+2
-2
@@ -1,2 +1,2 @@
|
|||||||
Winning_Numbers,Chance
|
Forecast,Chance
|
||||||
2-3-6,10123/15000
|
2-3-6,3419/5000
|
||||||
|
+2
-2
@@ -1,2 +1,2 @@
|
|||||||
Winning_Numbers,Chance
|
Forecast,Chance
|
||||||
3-5-6-8,27/500
|
3-4-8-9,531/10000
|
||||||
|
@@ -39,13 +39,13 @@ for n in range(0, 10):
|
|||||||
sorted_nums = sorted(likely_nums)
|
sorted_nums = sorted(likely_nums)
|
||||||
total_freq = sum(frequency)
|
total_freq = sum(frequency)
|
||||||
Chance = frac(total_freq, 15000) # Chance = number call freq / all possible numbers i.e. 1000
|
Chance = frac(total_freq, 15000) # Chance = number call freq / all possible numbers i.e. 1000
|
||||||
Winning_Numbers = str("-".join(sorted_nums))
|
Forecast = str("-".join(sorted_nums))
|
||||||
|
|
||||||
#print(f"Likely numbers are . . . {Winning_Numbers} \n"
|
#print(f"Likely numbers are . . . {Forecast} \n"
|
||||||
#f"With percent chance of winning being {Chance}")
|
#f"With percent chance of winning being {Chance}")
|
||||||
|
|
||||||
d = dict(((k, eval (k)) for k in ('Winning_Numbers','Chance')))
|
d = dict(((k, eval (k)) for k in ('Forecast','Chance')))
|
||||||
h = 'Winning_Numbers', 'Chance'
|
h = 'Forecast', 'Chance'
|
||||||
f = open('d3_ans.csv', 'w', encoding='utf_8')
|
f = open('d3_ans.csv', 'w', encoding='utf_8')
|
||||||
writer = csv.DictWriter(f, fieldnames=h)
|
writer = csv.DictWriter(f, fieldnames=h)
|
||||||
writer.writeheader()
|
writer.writeheader()
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ def get_data():
|
|||||||
}
|
}
|
||||||
# Get web data
|
# Get web data
|
||||||
r = requests.get(url, headers=header)
|
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)
|
pd.set_option('display.max_rows', None)
|
||||||
# Specifies no max rows, otherwise only shows 10 records
|
# 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']]
|
df2 = df[['Date', 'Numbers']]
|
||||||
date = list(df2['Date'])
|
date = list(df2['Date'])
|
||||||
nums = list(df2['Numbers'].astype('str'))
|
nums = list(df2['Numbers'].astype('str'))
|
||||||
@@ -42,13 +42,13 @@ for n in range(0, 9):
|
|||||||
sorted_nums = sorted(likely_nums)
|
sorted_nums = sorted(likely_nums)
|
||||||
total_freq = sum(frequency)
|
total_freq = sum(frequency)
|
||||||
Chance = frac(total_freq, 10000) # Chance = number call freq / all possible numbers i.e. 10000
|
Chance = frac(total_freq, 10000) # Chance = number call freq / all possible numbers i.e. 10000
|
||||||
Winning_Numbers = str("-".join(sorted_nums))
|
Forecast = str("-".join(sorted_nums))
|
||||||
|
|
||||||
#print(f"Likely numbers are . . . {Winning_Numbers} \n"
|
#print(f"Likely numbers are . . . {Forecast} \n"
|
||||||
#f"With percent chance of winning being {Chance}")
|
#f"With percent chance of winning being {Chance}")
|
||||||
|
|
||||||
d = dict(((k, eval (k)) for k in ('Winning_Numbers','Chance')))
|
d = dict(((k, eval (k)) for k in ('Forecast','Chance')))
|
||||||
h = 'Winning_Numbers', 'Chance'
|
h = 'Forecast', 'Chance'
|
||||||
f = open('d4_ans.csv', 'w', encoding='utf_8')
|
f = open('d4_ans.csv', 'w', encoding='utf_8')
|
||||||
writer = csv.DictWriter(f, fieldnames=h)
|
writer = csv.DictWriter(f, fieldnames=h)
|
||||||
writer.writeheader()
|
writer.writeheader()
|
||||||
|
|||||||
+2
-2
@@ -1,2 +1,2 @@
|
|||||||
Winning_Numbers,SB,Chance
|
Forecast,SB,Chance
|
||||||
1-10-32-46-48,[9],47/8663200
|
1-14-32-48-52,[2],37/6497400
|
||||||
|
+7
-7
@@ -1,5 +1,5 @@
|
|||||||
# WVLottopy: Matteo DiBiagio
|
# WVLottopy: Matteo DiBiagio
|
||||||
#from django_lottopy.lottopy_site.lottopy.lottopy_web_edition.megamil import Winning_Numbers
|
#from django_lottopy.lottopy_site.lottopy.lottopy_web_edition.megamil import Forecast
|
||||||
from fractions import Fraction as frac
|
from fractions import Fraction as frac
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
import requests
|
import requests
|
||||||
@@ -18,10 +18,10 @@ def get_data():
|
|||||||
|
|
||||||
# Get web data
|
# Get web data
|
||||||
r = requests.get(url, headers=header)
|
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)
|
pd.set_option('display.max_rows', None)
|
||||||
# Specifies no max rows, otherwise only shows 10 records
|
# 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']]
|
df2 = df[['Date', 'Numbers', 'SB', 'All Star']]
|
||||||
date = list(df2['Date'])
|
date = list(df2['Date'])
|
||||||
nums = list(df2['Numbers'].astype('str'))
|
nums = list(df2['Numbers'].astype('str'))
|
||||||
@@ -50,13 +50,13 @@ for n in range(0, 10):
|
|||||||
sorted_nums = sorted(likely_nums)
|
sorted_nums = sorted(likely_nums)
|
||||||
total_freq = sum(frequency + frequency_sb)
|
total_freq = sum(frequency + frequency_sb)
|
||||||
Chance = frac(total_freq, 25989600) # Chance = number call freq / all possible numbers i.e. 25,989,600
|
Chance = frac(total_freq, 25989600) # Chance = number call freq / all possible numbers i.e. 25,989,600
|
||||||
Winning_Numbers = str("-".join(sorted_nums))
|
Forecast = str("-".join(sorted_nums))
|
||||||
|
|
||||||
#print(f"Likely numbers are . . . {Winning_Numbers} SB: {SB}\n"
|
#print(f"Likely numbers are . . . {Forecast} SB: {SB}\n"
|
||||||
#f"With percent chance of winning being {Chance}")
|
#f"With percent chance of winning being {Chance}")
|
||||||
|
|
||||||
d = dict(((k, eval (k)) for k in ('Winning_Numbers', 'SB', 'Chance')))
|
d = dict(((k, eval (k)) for k in ('Forecast', 'SB', 'Chance')))
|
||||||
h = 'Winning_Numbers', 'SB', 'Chance'
|
h = 'Forecast', 'SB', 'Chance'
|
||||||
f = open('la_ans.csv', 'w', encoding='utf_8')
|
f = open('la_ans.csv', 'w', encoding='utf_8')
|
||||||
writer = csv.DictWriter(f, fieldnames=h)
|
writer = csv.DictWriter(f, fieldnames=h)
|
||||||
writer.writeheader()
|
writer.writeheader()
|
||||||
|
|||||||
+6
-6
@@ -16,10 +16,10 @@ def get_data():
|
|||||||
}
|
}
|
||||||
# Get web data
|
# Get web data
|
||||||
r = requests.get(url, headers=header)
|
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)
|
pd.set_option('display.max_rows', None)
|
||||||
# Specifies no max rows, otherwise only shows 10 records
|
# 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']]
|
df2 = df[['Date', 'Numbers', 'PB', 'PPX', 'Winners WV Only', 'Payout WV Only']]
|
||||||
date = list(df2['Date'])
|
date = list(df2['Date'])
|
||||||
nums = list(df2['Numbers'].astype('str'))
|
nums = list(df2['Numbers'].astype('str'))
|
||||||
@@ -48,13 +48,13 @@ for n in range(0, 26):
|
|||||||
sorted_nums = sorted(likely_nums)
|
sorted_nums = sorted(likely_nums)
|
||||||
total_freq = sum(frequency + frequency_pb)
|
total_freq = sum(frequency + frequency_pb)
|
||||||
Chance = frac(total_freq, 292201338) # Chance = number call freq / all possible numbers i.e. 292201338
|
Chance = frac(total_freq, 292201338) # Chance = number call freq / all possible numbers i.e. 292201338
|
||||||
Winning_Numbers = str("-".join(sorted_nums))
|
Forecast = str("-".join(sorted_nums))
|
||||||
|
|
||||||
#print(f"Likely numbers are . . . {Winning_Numbers} PB: {PB}\n"
|
#print(f"Likely numbers are . . . {Forecast} PB: {PB}\n"
|
||||||
#f"With percent chance of winning being {Chance}")
|
#f"With percent chance of winning being {Chance}")
|
||||||
|
|
||||||
d = dict(((k, eval (k)) for k in ('Winning_Numbers', 'PB', 'Chance')))
|
d = dict(((k, eval (k)) for k in ('Forecast', 'PB', 'Chance')))
|
||||||
h = 'Winning_Numbers', 'PB', 'Chance'
|
h = 'Forecast', 'PB', 'Chance'
|
||||||
f = open('pb_ans.csv', 'w', encoding='utf_8')
|
f = open('pb_ans.csv', 'w', encoding='utf_8')
|
||||||
writer = csv.DictWriter(f, fieldnames=h)
|
writer = csv.DictWriter(f, fieldnames=h)
|
||||||
writer.writeheader()
|
writer.writeheader()
|
||||||
|
|||||||
+6
-6
@@ -18,10 +18,10 @@ def get_data():
|
|||||||
|
|
||||||
# Get web data
|
# Get web data
|
||||||
r = requests.get(url, headers=header)
|
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)
|
pd.set_option('display.max_rows', None)
|
||||||
# Specifies no max rows, otherwise only shows 10 records
|
# 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']]
|
df2 = df[['Date', 'Numbers', 'MB', 'MP']]
|
||||||
date = list(df2['Date'])
|
date = list(df2['Date'])
|
||||||
nums = list(df2['Numbers'].astype('str'))
|
nums = list(df2['Numbers'].astype('str'))
|
||||||
@@ -50,13 +50,13 @@ for n in range(0, 25):
|
|||||||
sorted_nums = sorted(likely_nums)
|
sorted_nums = sorted(likely_nums)
|
||||||
total_freq = sum(frequency + frequency_mb)
|
total_freq = sum(frequency + frequency_mb)
|
||||||
Chance = frac(total_freq, 302575350) # Chance = number call freq / all possible numbers i.e. 11238513
|
Chance = frac(total_freq, 302575350) # Chance = number call freq / all possible numbers i.e. 11238513
|
||||||
Winning_Numbers = str("-".join(sorted_nums))
|
Forecast = str("-".join(sorted_nums))
|
||||||
|
|
||||||
#print(f"Likely numbers are . . . {Winning_Numbers} MB: {MB}\n"
|
#print(f"Likely numbers are . . . {Forecast} MB: {MB}\n"
|
||||||
#f"With percent chance of winning being {Chance}")
|
#f"With percent chance of winning being {Chance}")
|
||||||
|
|
||||||
d = dict(((k, eval (k)) for k in ('Winning_Numbers', 'MB', 'Chance')))
|
d = dict(((k, eval (k)) for k in ('Forecast', 'MB', 'Chance')))
|
||||||
h = 'Winning_Numbers', 'MB', 'Chance'
|
h = 'Forecast', 'MB', 'Chance'
|
||||||
f = open('mm_ans.csv', 'w', encoding='utf_8')
|
f = open('mm_ans.csv', 'w', encoding='utf_8')
|
||||||
writer = csv.DictWriter(f, fieldnames=h)
|
writer = csv.DictWriter(f, fieldnames=h)
|
||||||
writer.writeheader()
|
writer.writeheader()
|
||||||
|
|||||||
+2
-2
@@ -1,2 +1,2 @@
|
|||||||
Winning_Numbers,MB,Chance
|
Forecast,MB,Chance
|
||||||
17-21-3-40-7,[9],131/302575350
|
15-21-38-64-7,[9],43/100858450
|
||||||
|
+2
-2
@@ -1,2 +1,2 @@
|
|||||||
Winning_Numbers,PB,Chance
|
Forecast,PB,Chance
|
||||||
21-39-48-61-63,[18],193/292201338
|
33-36-37-39-6,[18],103/146100669
|
||||||
|
Reference in new issue
Block a user