I'm trying to read in the following tab separated data into pandas:
test.txt:
col_a\tcol_b\tcol_c\tcol_d
4\t3\t2\t1
4\t3\t2\t1
I import test.txt as follows:
pd.read_csv('test.txt',sep='\t')
The resulting dataframe has 1 column. The \t is not recognized as tab.
If I replace \t with a 'keyboard tab' the file is parsed correctly. I also tried replacing '\t with \t and /t and didn't have any luck.
Thanks in advance for your help.
Omar
PS: Screenshot https://i.stack.imgur.com/AykQl.jpg