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']] #----------------------------
{{#tags}}- {{label}}
{{/tags}}