The target is what you want to predict. Features are the information you can supply when that prediction is needed. A table often contains both, along with identifiers and administrative fields. Passing the whole table into a model can give it the answer directly. A record number may also encourage a meaningless shortcut.
In scikit-learn, X usually holds a two-dimensional feature matrix and y holds a one-dimensional target. Their rows must stay aligned. Selecting features from one order and labels from another creates plausible code with false training pairs. Use the provided feature list as a contract, preserve its order, and keep the target separate. One audit exercise explicitly asks you to retain an identifier so you can distinguish a task requirement from a general modeling recommendation.