replaced append with concat

This commit is contained in:
2022-12-27 14:21:12 -05:00
parent 2ffee3f4c1
commit e15eff3bc1
5 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -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'))
+2 -2
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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'))