I would like to iterate over every 1000 rows of a text file. I used to do something similar with a database, and there I have first written a new id for every 1000 rows, and have iterated over it. Now I would like to do it with the text file itself. Is there some pythonic way to do it? I have came only so far.
import pandas as pd
input_file = 'text.csv'
my_input = pd.read_csv(input_file, sep = ';')
length = my_input.shape[0]
start = 0
end = 999
#for the length of the whole document take the lines in range(start,end)
do stuff
start =+ 1000
end =+ 1000