edouardthom / ATPBetting

A strategy for tennis matches betting
432 stars 194 forks source link

IndexError: index 0 is out of bounds for axis 0 with size 0 #12

Open peterpettas opened 3 years ago

peterpettas commented 3 years ago

It runs ok until this error comes up:

main.py:99: FutureWarning: In a future version of pandas all arguments of concat except for the argument 'objs' will be keyword-only features_onehot = pd.concat([features_categorical_encoded,players_encoded,tournaments_encoded],1) main.py:126: FutureWarning: In a future version of pandas all arguments of concat except for the argument 'objs' will be keyword-only features = pd.concat([features_odds, Traceback (most recent call last): File "main.py", line 152, in <module> test_beginning_match=data[data.Date==start_date].index[0] #id of the first match of the testing set File "/Users/peter/Library/Python/3.8/lib/python/site-packages/pandas/core/indexes/base.py", line 4604, in __getitem__ return getitem(key) IndexError: index 0 is out of bounds for axis 0 with size 0

Can someone assist with this so I can run the code properly?

PierreOutin commented 2 years ago

same issue