我有优秀的表格,如je2456,je2645,je2893等....
我想将它保存在python的列表中。
但是它在导入时会抛出错误 '不存在此类文件或目录。'
答案 0 :(得分:0)
import csv
def csv_reader(input_file_name):
with open(input_file_name, newline='') as csvfile:
return list(csv.reader(csvfile))
# Make sure to add the extension for the file name, whatever it may be.
my_data_list = csv_reader("Your_Input_File_Here.csv")
现在,您的my_data_list
是一个包含CSV文件中所有行的列表。