File tree 1 file changed +14
-2
lines changed
1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -742,10 +742,22 @@ def read(self):
742
742
obj = concat (self )
743
743
elif self .lines :
744
744
data = ensure_str (self .data )
745
+ print (data )
745
746
if self .nrows :
746
747
compiled_pattern = re .compile ("\n " )
747
- data_iterator = compiled_pattern .finditer ("data" )
748
- data = list (islice (data_iterator , self .nrows ))
748
+ data_iterator = compiled_pattern .finditer (data )
749
+ data_surrogate = []
750
+ start = 0
751
+ nrows_seen = 0
752
+ for vals in data_iterator :
753
+ if nrows_seen >= self .nrows :
754
+ break
755
+ begin , end = vals .span ()
756
+ data_surrogate .append (data [start :begin ].strip ())
757
+ start = end
758
+ nrows_seen += 1
759
+ data = data_surrogate
760
+ print (data )
749
761
else :
750
762
data = data .split ("\n " )
751
763
obj = self ._get_object_parser (self ._combine_lines (data ))
You can’t perform that action at this time.
0 commit comments