我有一个50万行的CSV。目前我只需要使用文件中的一个值,我可以得到它。我想做的是一旦值被用来删除行,这是可能的吗?你知道吗
这是我目前的代码:
import csv
import os
def getvin():
linenumber = 1
with open(os.path.join(os.path.dirname(__file__), 'ITRACK6VIN.csv'), 'rb') as csvfile:
vinreader = csv.reader(csvfile)
myvins = list(vinreader)
text = myvins[linenumber][0]
return text
print getvin()
达特霍普托,如果你想遍历vin编号,那么你可以这样做
听起来你想要这样的东西:
相关问题 更多 >
编程相关推荐