# Convert .csv into dataset.Dataset

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconvert-csv-into-dataset-dataset%2F15900%3E%5C
**Category:** Beginners\
**Created:** [March 20, 2022, 10:11pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconvert-csv-into-dataset-dataset%2F15900 "2022-03-20T22:11:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Petar](https://avatars.discourse-cdn.com/v4/letter/p/dfb087/32.png) [@Petar](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FPetar)%5C
**Post date:** [March 20, 2022, 10:11pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconvert-csv-into-dataset-dataset%2F15900%2F1 "2022-03-20T22:11:56Z")

</div>

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!

 ![Screenshot 2022-03-20 231039](https://us1.discourse-cdn.com/hellohellohello/original/2X/0/00ef2236be1a18b2fdd7a99d7273ee3932a0f764.png)

---

<div class="post-metadata">

**Author:** ![beneyal](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/beneyal/32/27988_2.png) [@beneyal](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fbeneyal)%5C
**Post date:** [March 20, 2022, 10:26pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconvert-csv-into-dataset-dataset%2F15900%2F2 "2022-03-20T22:26:31Z")

</div>

Hi! 👋

Did you try [this](https://huggingface.co/docs/datasets/loading#csv) for loading a CSV using `load_dataset`? This should give you a `Dataset` object which you can map over.

---

<div class="post-metadata">

**Author:** ![Petar](https://avatars.discourse-cdn.com/v4/letter/p/dfb087/32.png) [@Petar](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FPetar)%5C
**Post date:** [March 20, 2022, 10:42pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fconvert-csv-into-dataset-dataset%2F15900%2F3 "2022-03-20T22:42:09Z")

</div>

It solves the problem. Thanks beneyal!
