We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f5046c commit 2d222cfCopy full SHA for 2d222cf
pandas/io/parsers/python_parser.py
@@ -222,11 +222,10 @@ class MyDialect(csv.Dialect):
222
# prevents CSV parsing errors on lines that will be discarded
223
if self.skiprows is not None:
224
while self.skipfunc(self.pos):
225
- self.pos += 1
226
- try:
227
- f.readline()
228
- except (StopIteration, AttributeError):
+ line = f.readline()
+ if not line:
229
break
+ self.pos += 1
230
else:
231
# attempt to sniff the delimiter from the first valid line,
232
# i.e. no comment line and not in skiprows
0 commit comments