Separate x and y values in mnist dataset

please how we are separating values of x
and y when we have to take whole column or whole row .