How do I get labels from a pandas dataframe with get_y while forming a DataBlock?

There are training images inside a folder with numeric IDs as filenames. And there is a .csv file that provides the label for each image in the training set.

My plan is to read that .csv file into a pandas DataFrame, and use that DataFrame to get labels and load the information into a DataBlock using the get_y parameter.

How do I achieve this?

[Note: I am not trying to form an ImageDataBunch.]

If there is a column in the DataFrame that has the labels, you can use ColReader to get the labels.