I have a tab seperated csv file like below:
1 2 3 4 5 6 7 8 9 10
a b c d e f g h i j
k l m n o p q r s t
And, I'm reading it to a dataframe with the below code
df = pd.read_csv('C:/Users/IBM_ADMIN/Desktop/Delete/input1.csv',encoding='ANSI', delimiter='\t', header=0)
When I execute the above code I'm getting output like this image -> what_I_got
But, I'm expecting like this -> desired_output
I tried many ways to split the column but it's not working.Could you help me with a solution please?
,try removedelimiter='\t',, because default separator is,delimiter="\t", you're likely passing the delimiter as a literalt- try double-escaping it withdelimiter="\\t"to actually get a tab character.