replaced append with concat
This commit is contained in:
@@ -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'))
|
||||||
|
|||||||
@@ -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'))
|
||||||
|
|||||||
+2
-2
@@ -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', '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'))
|
||||||
|
|||||||
+2
-2
@@ -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', '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'))
|
||||||
|
|||||||
+2
-2
@@ -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', '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'))
|
||||||
|
|||||||
Reference in New Issue
Block a user