Repairing one column RPT File in Pandas

Viewed 98

I'm import data from Microsoft SQL server, Here's my code

df = pd.read_table("Some_data.rpt")

when I print df , the result

    ColumnA ColumnB ColumnC ColumnD ColumnE`
0             ------ ------ ----- ----- ---
1                           896 578 AC 73 8
2                           976 782 AD 78 9
3                           763 678 AC 52 8

And df.shape give output (245237,1). My questions how to make format table like

    ColumnA  ColumnB  ColumnC  ColumnD ColumnE
0    ------   ------    -----    -----     ---
1       896      578       AC       73       8
2       976      782       AD       78       9
3       763      678       AC       52       8

Thanks in advance

1 Answers

It looks like you need to define your seperator. Try with a space:

df = pd.read_table("Some_data.rpt", sep=" " )
Related