# Import csv file into FLAC3D

**URL:** <https://forum.itascainternational.com/t/import-csv-file-into-flac3d/685>\
**Category:** FLAC3D\
**Created:** [August 1, 2022, 9:10am UTC](https://forum.itascainternational.com/t/import-csv-file-into-flac3d/685 "2022-08-01T09:10:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sen](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@Sen](https://forum.itascainternational.com/u/Sen)\
**Post date:** [August 1, 2022, 9:10am UTC](https://forum.itascainternational.com/t/import-csv-file-into-flac3d/685/1 "2022-08-01T09:10:40Z")

</div>

Hello everyone,  
is there a command to import data from csv file and assign the values to variables?

---

<div class="post-metadata">

**Author:** ![sb\_guido](https://avatars.discourse-cdn.com/v4/letter/s/6f9a4e/32.png) [@sb\_guido](https://forum.itascainternational.com/u/sb_guido)\
**Post date:** [August 1, 2022, 11:41am UTC](https://forum.itascainternational.com/t/import-csv-file-into-flac3d/685/2 "2022-08-01T11:41:25Z")

</div>

Using Fish or Python?

I mainly use Python, so you can easily find help online. Look for “csv reader”, something like this:

```auto
import csv

with open('test.csv') as csv_file:
    reader = csv.reader(csv_file, delimiter=',')

```

You can then loop through the reader variable.

Pandas is not supported with the software.

---

<div class="post-metadata">

**Author:** ![Sen](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@Sen](https://forum.itascainternational.com/u/Sen)\
**Post date:** [August 1, 2022, 12:28pm UTC](https://forum.itascainternational.com/t/import-csv-file-into-flac3d/685/3 "2022-08-01T12:28:53Z")

</div>

Thank you very much @sb_guido !

the documentation says external moduls can be installed:  
’ It is possible to use most third-party Python extension modules with Itasca software. Extension modules can be installed with the `pip` executable shipped with the program.’

A short video on how to install extension moduls would be very helpfull!

---

<div class="post-metadata">

**Author:** ![Moo](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Moo](https://forum.itascainternational.com/u/Moo)\
**Post date:** [August 1, 2022, 1:18pm UTC](https://forum.itascainternational.com/t/import-csv-file-into-flac3d/685/4 "2022-08-01T13:18:57Z")

</div>

You can use Python:  
In FISH see the intrinsics file.all and string.csv. from  
[http://docs.itascacg.com/flac3d700/common/fish/doc/fish\_manual/fish\_fish/file\_utilities/fish\_file.all.html#file.all](http://docs.itascacg.com/flac3d700/common/fish/doc/fish_manual/fish_fish/file_utilities/fish_file.all.html#file.all)  
[http://docs.itascacg.com/flac3d700/common/fish/doc/fish\_manual/fish\_fish/string\_utilities/fish\_string.csv.from.html#string.csv.from](http://docs.itascacg.com/flac3d700/common/fish/doc/fish_manual/fish_fish/string_utilities/fish_string.csv.from.html#string.csv.from)

To get a list of lists of string tokens from a CSV text file, for example  
local mystrings = string.csv.from(::file.all(‘filename.txt’,‘text’))

You can then convert these tokens using the type construction functions, or use string.type() to examine the string and attempt to deduce a type.
