Below is the code while running the code, getting an AttributeError: 'NoneType' object has no attribute 'format'.
import csv
import numpy
def loadCsv(filename):
lines = csv.reader(open(filename,"r"))
dataset = list(lines)
for i in range(len(dataset)):
dataset[i] = [float(x) for x in dataset[i]]
return dataset
filename = 'data1.csv'
dataset = loadCsv(filename)
print('Loaded data file {0} with {1} rows').format(filename, len(dataset))
print('Loaded data file {0} with {1} rows').format(filename, len(dataset))should beprint('Loaded data file {0} with {1} rows'.format(filename, len(dataset)))-formatis a string method.NoneType, which is something you should have included in your question.