Currently i have problems with the formatting of the read data. Instead of returning a list for each row, the code returns a list with each index being a column.
The csv file looks like this:
2020-08-26 00:00:00,2020-08-27 00:00:00,2020-08-28 00:00:00
1505,1515,1527
And the code is this:
with open("csvfile.csv", "r") as f:
reader = csv.reader(f, delimiter=",")
for i, line in enumerate(reader):
print(line[0].format(i, line))
Current output:
2020-08-26 00:00:00
1505
Desired output:
['2020-08-26 00:00:00','2020-08-27 00:00:00','2020-08-28 00:00:00']
[1505, 1515, 1527]