how to print ceratin rows of dataframe

% Create a sample dataframe
data = rand(5, 3);
df = array2table(data, 'VariableNames', {'A', 'B', 'C'});

% Print specific rows of the dataframe
rows_to_print = [2, 4];
disp(df(rows_to_print, :));