def read_file():
with open("bla.csv", "r") as Blabla:
reader = csv.reader(BlaBla)
for column in reader:
one = column[1]
two = column[2]
three = column[3]
four = column[4]
bla_line.append([one, two, three, four])
count, c = 50, 1
while c < count:
read_file()
c = c + 1
How is it possible to read the file line by line while looping? One line for every c
.
c = 0 = read line 0
c = 1 = read line 1
c = 2 = read line 2
and so on and so on...
islice
, pandas
, and so on, didn't work it out for me so far.
I need this construction exact as it is for another function and later operations which are not listed here.
The append
operations works fine so far. The issue here is to iterate over the file like I described.