Jun-01-2022, 02:50 PM
(This post was last modified: Jun-05-2022, 12:29 AM by Larz60+.
Edit Reason: fixed python tags
)
Ciao,
I'm basically new with python. I have a CSV like the one one attached and I want save each column (without the ";") into a variable.
I need a while loop.
Until now I've understood only how to open the CSV and in case make a print of it
I'm basically new with python. I have a CSV like the one one attached and I want save each column (without the ";") into a variable.
I need a while loop.
Until now I've understood only how to open the CSV and in case make a print of it
with open('C:\python\csv_prova.csv') as csv_file: csv_reader = csv.reader(csv_file, delimiter=';') for i in csv_reader: for j in i: print(j, end=" ") print("")but with the loop and how to get the single value I'm a bit lost. can you help me? thanks
Attached Files
csv_prova.csv (Size: 189 bytes / Downloads: 117)