Python : 将dataframe中的一列设置为索引 df = pd.DataFrame({'a':[1,2],'b':[3,4]}) df.set_index(['a'],inplace=True)