Slicing DataFrames
You provide a row_index and a column_index - they can be slices or lists or whatever to the .loc[row_names, col_names] indexer
example: [your_dataframe_name].loc[my_row_names, my col_names].You provide the row and column numbers to the .iloc[row_numbers, col_numbers]
example: [your_dataframe_name].iloc[my_row_numbers, my col_numbers]ms.loc[:,'Protein Name'] #get all row (:), 'Protein Name' column










Last updated
Was this helpful?
