How can I read a column from a CSV file and turn all of it into a string, and then add it?
import csv
print("HI!, Welcome to spreadsheet reader protype")
fileNameLocator = input("Search file: ") + ".csv"
fileName = open(fileNameLocator)
fileReader = csv.reader(fileName)
# price column
next(fileReader)
for line in fileReader:
print(line[11])
I have this block of code that prints the desired columns I want from a file, and it gives the numbers vertically as a list, but these numbers are a string, how can I turn them into floats (they are decimals) and then add this numbers(20 or so).