I want to read the last 24 rows of a csv file using python. So for example if the csv Data has 500 rows, I want to write row 476 to row 500. I dont know how many rows the csv file has. I tried this code, doesn't work. Can someone help me?
z=0
r=0
for row in csvData:
z += 1
for row in csvData:
if r > (z-30) || r < z:
html.write('{ x: new Date('+ row[0] + '), y:' + row[2] + '},')
r += 1