Skip to content

Commit 9d2265f

Browse files
author
Ben Kandel
committed
fix python parser too
1 parent 96ede12 commit 9d2265f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/io/parsers.py

+6
Original file line numberDiff line numberDiff line change
@@ -2083,6 +2083,12 @@ def _infer_columns(self):
20832083
# We have an empty file, so check
20842084
# if columns are provided. That will
20852085
# serve as the 'line' for parsing
2086+
if have_mi_columns:
2087+
if clear_buffer:
2088+
self._clear_buffer()
2089+
columns.append([None] * len(this_columns))
2090+
return columns, num_original_columns
2091+
20862092
if not self.names:
20872093
raise EmptyDataError(
20882094
"No columns to parse from file")

0 commit comments

Comments
 (0)