def loadCsv(filename): lines = csv.reader(open('diabetes.csv')) dataset = list(lines) for i in range(len(dataset)): dataset[i] = [float(x) for x in dataset[i] return dataset
I'm trying to implement Naive-Bayes but its giving me this error even though I've manually changed the type of each column to float.it's still giving me error.
Above is the function to convert.