Start by making train and test row roles visible.
Show the role column
Rows A, B, and C are marked train. Rows D and E are marked test. The role column is part of the displayed data.
A,B,C: trainD,E: test
Read the train y values
The train y values are 2, 4, and 6.
ytrain=(2,4,6)
Keep test rows held out
The test y values are 3 and 7. They are visible, but they are not used in the train statistic.
ytest=(3,7)