【发布时间】:2013-01-30 21:48:59
【问题描述】:
我需要从我读取的 CSV 文件中删除空格
import csv
aList=[]
with open(self.filename, 'r') as f:
reader = csv.reader(f, delimiter=',', quoting=csv.QUOTE_NONE)
for row in reader:
aList.append(row)
# I need to strip the extra white space from each string in the row
return(aList)
【问题讨论】:
标签: python csv data-munging