File tree 2 files changed +3
-3
lines changed
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):
2083
2083
# We have an empty file, so check
2084
2084
# if columns are provided. That will
2085
2085
# serve as the 'line' for parsing
2086
- if have_mi_columns :
2086
+ if have_mi_columns and hr > 0 :
2087
2087
if clear_buffer :
2088
2088
self ._clear_buffer ()
2089
- columns .append ([None ] * len (this_columns ))
2089
+ columns .append ([None ] * len (columns [ - 1 ] ))
2090
2090
return columns , num_original_columns
2091
2091
2092
2092
if not self .names :
Original file line number Diff line number Diff line change @@ -718,7 +718,7 @@ cdef class TextReader:
718
718
719
719
# e.g., if header=3 and file only has 2 lines
720
720
elif (self .parser.lines < hr + 1
721
- and not isinstance (self .orig_header, list )) or (
721
+ and not isinstance (self .orig_header, list )) or (
722
722
self .parser.lines < hr):
723
723
msg = self .orig_header
724
724
if isinstance (msg, list ):
You can’t perform that action at this time.
0 commit comments