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 @@ -715,7 +715,7 @@ cdef class TextReader:
715
715
716
716
# e.g., if header=3 and file only has 2 lines
717
717
elif (self .parser.lines < hr + 1
718
- and not isinstance (self .orig_header, list )) or (
718
+ and not isinstance (self .orig_header, list )) or (
719
719
self .parser.lines < hr):
720
720
msg = self .orig_header
721
721
if isinstance (msg, list ):
You can’t perform that action at this time.
0 commit comments