def calcscore():
if FTHG > FTAG:
POINTS[HomeTeam] == 3
if FTHG == FTAG:
POINTS[Hometeam] == 1
POINTS[Awayteam] == 1
else:
POINTS[AwayTeam] == 3
return pandas.Series(POINTS, index=prem.index)
calcscore()
Hi, I am new to coding and am trying a premier league dataset and am trying to assign scores to points for the home and away teams but keep getting syntax or indenting errors. Why is this and how would I write it in order for it to work thank you, I have spent hours on this. The top of the dataset is below.
Div Date Time HomeTeam AwayTeam FTHG FTAG
FTR \
0 E0 09/08/2019 20:00 Liverpool Norwich 4 1 H
1 E0 10/08/2019 12:30 West Ham Man City 0 5 A
Aucun commentaire:
Enregistrer un commentaire