Convert .csv into dataset.Dataset

Hi,

I need help understanding how to convert csv file into dataset.Dataset object. I’ve followed huggingface’s tutorials and course and I see in all of their examples they are loading dataset from the hub which is in the right format for data manipulation and model input.

When I upload my dataset as a csv file, I can’t implement the map function and can’t get the data in the right format in order to insert it into the model.

I have seen similar topics but no solution for this particular problem. Here is a screenshot from the part of the code I have trouble executing.

Thanks!

Hi! :wave:

Did you try this for loading a CSV using load_dataset? This should give you a Dataset object which you can map over.

1 Like

It solves the problem. Thanks beneyal!

1 Like