I want to create myself odds data using .xlsx #160
guanjen375
started this conversation in
General
Replies: 1 comment 3 replies
-
Maybe this solution works, i think the error is little cutoff? maybe is there more error message below the screenshot?
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to create my .sqlite file using the .xlsx provided by yourself.
Here is my code:
import random
import time
import pandas as pd
import sqlite3
import os
from datetime import datetime
from tqdm import tqdm
df_data = []
path = '../../Odds-Data/Odds-Data-Clean/'
for filename in os.listdir(path):
if not filename.startswith('~') and filename.endswith('.xlsx'):
data = pd.read_excel(path+filename)
for row in data.itertuples():
print(data.columns)
day = row[2]
home_team = row[3]
away_team = row[4]
ou = row[5]
if(int(row[7])<0):
spread = int(row[6])
else:
spread = int(row[6])*(-1)
ML_HOME = row[7]
ML_AWAY = row[8]
point = row[9]
diff = row[10]
print(day)
Unfortunately, I got fail. The error message is as follow:
I have checked my .xlsx and could not find the error:
Do you have any comment on how to solve this problem?
Beta Was this translation helpful? Give feedback.
All reactions