I have data which has several header rows at the beginning of data and footer at the end of the data.
Both header and footer text start with an identifier !.
(number of rows of header, footer and data in-between vary)
Example with arbitrary data (available as .txt file)
! header first line
! header second line
Parameter LSL USL Units
voltage 0.1 0.5 V
Capacitance 0.3 0.7 pF
Resistance 0.5 9 Ohms
! Footer second line
! Footer third line
! Footer third line
Can I use open () so that I can exclude header and footer data while importing data in text format?
I am able to use open() to import data keeping the header and footer text (say into a table dt).
I also want to know how to extract (to a new table dt_new) data excluding the header and footer which start with an identifier, say !.
Finally, I want to save the header and footer data in dt in a separate table, say dt_hf. How to do this?
Thanks.
When it's too good to be true, it's neither