# Displaying .csv file content in perspective

**URL:** <https://forum.inductiveautomation.com/t/displaying-csv-file-content-in-perspective/91214>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [May 31, 2024, 6:31pm UTC](https://forum.inductiveautomation.com/t/displaying-csv-file-content-in-perspective/91214 "2024-05-31T18:31:49Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![josborn](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@josborn](https://forum.inductiveautomation.com/u/josborn)\
**Post date:** [May 31, 2024, 6:38pm UTC](https://forum.inductiveautomation.com/t/displaying-csv-file-content-in-perspective/91214/3 "2024-05-31T18:38:36Z")

</div>

> [@Upload csv to dataset](https://forum.inductiveautomation.com/t/upload-csv-to-dataset/79797/2):
>
> Figured it out, Not sure why I got hung up like I did. If anyone else gets stuck: the following class can parse csv files and store as a dataset: class CSVParser: def \_\_init\_\_(self, file\_in): self.file = file\_in self.file\_string = file\_in.getString() self.rows = [row.split(',') for row in self.file\_string.split('\r')] self.num\_cols = max([len(row) for row in self.rows]) self.num\_rows = len(self.rows) self.headers = self.rows[0] self.data = self.rows[1:] @property def extend…

Travis' code worked great for me when i needed to do this.

---

_[View the full topic](https://forum.inductiveautomation.com/t/displaying-csv-file-content-in-perspective/91214)._
