I am trying to read a text file using pd.read_csv
df = pd.read_csv('filename.txt', delimiter = "\t")
My text file (see below) has a few lines of text before the dataset I need to import begins. How do I skip the lines before the dataset headers? I don't want to use any solution that involves counting the number of lines I need to skip because I have to do this for multiple (similar, not same) text files. Any help is appreciated!
Note: I cannot upload the text file as it is confidential
=========================================
hello 123
=========================================
Dir: /x/y/z/RTchoice/release001/data
Date: 17-Mar-2020 10:0:08
Output File: /a/b/c/filename.txt
N: 2842
-----------------------------------------
Subject col1 col2 col3
001 10.00000 1.00000 3.00000
002 11.00000 2.00000 4.00000
skiprowsargmument.pd.read_csv('filename.txt', delimeter='\t', skiprows=8)'---------'that breaks the header from the data? You tell me. You can't just craft magic. There has to be some logic to it.skiprowsargument