I have a large csv file with 100's of columns in it. Currently im able to read the csv file and its particular row. My file is inside a zipfile and here is the code i have so far.
import os, sys, csv, zipfile
zip_file = zipfile.ZipFile('some_zip_file.zip')
f = zip_file.open('some_csv_file.csv', 'r')
for row in csv.reader(f):
print row[1]
f.close()
But is there a way to extract only the column names from the csv file? Im using python 2.7