大熊猫可以读取转置的CSV吗?

ajw*_*ood 9 python csv pandas

可以pandas读取转置的CSV吗?这是文件(注意我还想选择列的子集):

A,x,x,x,x,1,2,3
B,x,x,x,x,4,5,6
C,x,x,x,x,7,8,9
Run Code Online (Sandbox Code Playgroud)

想得到这个DataFrame:

   A  B  C
0  1  4  7
1  2  5  8
2  3  6  9
Run Code Online (Sandbox Code Playgroud)

piR*_*red 11

pd.read_csv('file.csv', index_col=0, header=None).T
Run Code Online (Sandbox Code Playgroud)