File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2083,10 +2083,10 @@ 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 :
2086+ if have_mi_columns and hr > 0 :
20872087 if clear_buffer :
20882088 self ._clear_buffer ()
2089- columns .append ([None ] * len (this_columns ))
2089+ columns .append ([None ] * len (columns [ - 1 ] ))
20902090 return columns , num_original_columns
20912091
20922092 if not self .names :
Original file line number Diff line number Diff line change @@ -715,7 +715,7 @@ cdef class TextReader:
715715
716716 # e.g., if header=3 and file only has 2 lines
717717 elif (self .parser.lines < hr + 1
718- and not isinstance (self .orig_header, list )) or (
718+ and not isinstance (self .orig_header, list )) or (
719719 self .parser.lines < hr):
720720 msg = self .orig_header
721721 if isinstance (msg, list ):
You can’t perform that action at this time.
0 commit comments