使用pandas读取csv文件,数据不对齐问题

使用pandas读取csv文件,在一定参数下,第一行错位俩列,如何才能使其对其

img


想要 第一行的A 在 M的上方 ,R 在-2的上方,如何实现

import pandas as pd
f = pd.read_csv('ckm1.ascii_pssm.2',header=1,delim_whitespace=True,skipfooter=6,usecols=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])
df = pd.DataFrame(f)
这是读取参数的代码
#python

index_col : int or sequence or False, default None Column to use as the row labels of the DataFrame. If a sequence is given, a MultiIndex is used. If you have a malformed file with delimiters at the end of each line, you might consider index_col=False to force pandas to not use the first column as the index (row names)

index_col=False 使得pandas不用第一列做索引(行名)

加这个参数试试:index_col=False