I have a csv file with 5 columns and many rows in the following format:
BAL 27 DEN 49 2013-09-05T20:30:00
I want to compare the 2 scores and return the name of the winner as a 6th column
I tried this:
from pandas import read_csv
Games = open("games.csv","rb")
df = read_csv(Games, header=None)
#print df
#print df[0]
if df[3] > df[1]:
print df[2]
else:
print df[0]
I am getting an ValueError: The truth value of a Series is ambiguous
Any ideas how I can accomplish my goal?