from pandas import DataFrame df=DataFrame([[1,2,3], [10,20,30], [100,200,300], [1000,2000,3000]], index=['row_0', 'row_1','row_2','row_3'], columns=['col_0','col_1','col_2']) #----------------------------- # col_0 col_1 col_2 # row_0 1 2 3 # row_1 10 20 30 # row_2 100 200 300 # row_3 1000 2000 3000 #----------------------------- # # 行ラベルを指定 # df.loc[['row_2','row_3']] #----------------------------