import csv with open(r"C:\File.csv") as csvfile: rows = list(csv.reader(csvfile)) data_header = rows[0] data_rows = rows[1:]
Select allOpen in new window
import csv FilePath = "C:\File.csv" with open(r % FilePath) as csvfile: rows = list(csv.reader(csvfile)) data_header = rows[0] data_rows = rows[1:]
with open(FilePath) as csvfile:
with open(r"C:\File.csv") as csvfile:
Open in new window