import csv filename="D:Users/FengZH2/Desktop/test/result.csv" with open(filename) as f: reader=csv.reader(f) header_row=next(reader) for index,column_header in enumerate(header_row): print(index,column_header)
或者
data = pd.read_csv('data/Receipt code January minute trading volume.csv') print([column for column in data])
或者
x2.columns