I am using this line to read part of the lines in the attached file, skipping header and footer.
np_data= np.loadtxt(file, delimiter= "t", skiprows=12, max_rows= 1024)
The problem is that in the footer there is this character: ∞, which causes the following error
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb0 in position 4729: invalid start byte
Is there a way to skip that character or line? For me the combination of skiprows and max_rows does not seem to work.
Thank you
Luca Moleri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1