Closed
Description
Hi there,
I tested:
data = """A,B,C
foo,1,2,3
bar,4,5,6
baz,7,8,9
"""
reader = pd.read_csv(StringIO(data), iterator=True)
I thought that I could do:
for row in reader:
print(row)
since reader
is iterable. Unfortunately, it calls the generator TextFileReader.__iter__
:
def __iter__(self):
try:
while True:
yield self.read(self.chunksize)
except StopIteration:
pass
where self.chunksize
is None
. Maybe set self.chunsize
to 1 when it's not
defined and there is iterator=True
. I'll propose a patch as soon as possible
--- today or tomorrow.
Best regards,
Damien G.