最基本的用法,将重新排序的索引传给labels参数,上面的例子中将['A', 'B', 'C']重新按['C', 'B', 'A']进行对齐。 # 指定重设的是行索引还是列索引,默认是行索引 df3 = df.reindex(['Col-2', 'c3', 'Col-1'], axis='columns') print(df3) # 同时调整行和列 df4 = df.reindex(