我有这个样本txt文件,如下所示:
ACW00011604 17.1167 -61.7833 10.1 ST JOHNS COOLIDGE FLD
ACW00011647 17.1333 -61.7833 19.2 ST JOHNS
E000041196 25.3330 55.5170 34.0 SHARJAH INTER. AIRP
等...
我需要的是这个文件加载如下:
X X.1 X.3 X.4 X.5
ACW00011604 17.1167 -61.7833 10.1 ST JOHNS COOLIDGE FLD
ACW00011647 17.1333 -61.7833 19.2 ST JOHNS
我尝试将导入pandas作为pd
ds=pd.read_table("st.txt", delim_whitespace=True, header=None)
但它的作用如下:
X X.1 X.3 X.4 X.5 X.6 X.7 X.8
ACW00011604 17.1167 -61.7833 10.1 ST JOHNS COOLIDGE FLD
ACW00011647 17.1333 -61.7833 19.2 ST JOHNS
E000041196 25.3330 55.5170 34.0 SHARJAH INTER. AIRP
我该如何处理?