未验证 提交 f8f924ed 编写于 作者: M Meiyim 提交者: GitHub

Merge pull request #352 from xixiaoyao/develop

fix csv reader bug
...@@ -42,11 +42,7 @@ if six.PY3: ...@@ -42,11 +42,7 @@ if six.PY3:
def csv_reader(fd, delimiter='\t'): def csv_reader(fd, delimiter='\t'):
def gen(): def gen():
for i in fd: for i in fd:
slots = i.rstrip('\n').split(delimiter) yield i.rstrip('\n').split(delimiter)
if len(slots) == 1:
yield slots,
else:
yield slots
return gen() return gen()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册