I am trying to read the subset of some data from a large CSV file, I have tried using nrows, but it returns the following error message, 'TypeError: 'nrows' is an invalid keyword argument for this function' unsure how to correct it.
with open('file.csv') as csv_file:
csv_reader = reader(csv_file, nrows=350)
lines = list(csv_reader)
print(lines)
#Aim was to print 350 rows in a list of lists
TypeError: 'nrows' is an invalid keyword argument for this function