# Convert unicode from API Endpoint (csv) to csv or jason or pydataset

**URL:** <https://forum.inductiveautomation.com/t/convert-unicode-from-api-endpoint-csv-to-csv-or-jason-or-pydataset/72721>\
**Category:** General Discussion\
**Created:** [April 20, 2023, 5:23pm UTC](https://forum.inductiveautomation.com/t/convert-unicode-from-api-endpoint-csv-to-csv-or-jason-or-pydataset/72721 "2023-04-20T17:23:53Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 20, 2023, 5:30pm UTC](https://forum.inductiveautomation.com/t/convert-unicode-from-api-endpoint-csv-to-csv-or-jason-or-pydataset/72721/3 "2023-04-20T17:30:29Z")

</div>

You can use Python's `csv` module to parse the CSV, then construct your dataset yourself:

> [@Perspective onFileReceived - CSV](https://forum.inductiveautomation.com/t/perspective-onfilereceived-csv/39893/2):
>
> If you want to use Python’s built-in csv module, you need to construct a file-like object to pass to the reader. Luckily, Python also predicted the idea of interpreting a string in memory as a ‘file-like’ object, so the StringIO module already exists. What you want is probably something like this: from StringIO import StringIO fileContents = event.file.getString("UTF-8") reader = csv.DictReader(StringIO(fileContents)) for row in reader: print row

[https://docs.inductiveautomation.com/display/DOC81/system.dataset.toDataSet](https://docs.inductiveautomation.com/display/DOC81/system.dataset.toDataSet)

---

_[View the full topic](https://forum.inductiveautomation.com/t/convert-unicode-from-api-endpoint-csv-to-csv-or-jason-or-pydataset/72721)._
