for t in teams: eventsByTeam[str(t)] = df.loc[(df[\'teamId\'] == t) & (df[\'positions\'][0][\'x\'] == 50)]
The above code will not run, citing a