profits = 0
losses = 0
netprofits = 0
with open(csvpath) as csvfile:
csvreader = csv.reader(csvfile, delimiter =',')
csvheader = next(csvreader)
for row in csvreader:
if (int(row[1])) > 0:
profits += float(row[1])
profits = (profits)
print(sum(profits))
I keep getting an error that says it is unable to iterate the float() object. Any advice would be greatly appreciated.
Aucun commentaire:
Enregistrer un commentaire