Read and Write CSV Files

  • 28 March 2019
  • 2 replies
  • 184 views

Userlevel 2
CSV files are a de facto standard for communication of data. AIMMS provides the libraries
code:
DataLink
and
code:
CSVProvider
for the serializing of CSV files.

In this article an example is provided for reading data from a CSV file.

2 replies

Userlevel 4
It seems that you have to have a clean csv to use this. Is it possible to import a csv where the first "column" isn't used in the model?

For example, if I export a python/pandas dataframe as a csv, it has the index in the first column. How do I "skip" over this while reading it into AIMMS?

And, yes, I can turn it off in python, but I need it there for other things.
Userlevel 5
@MathFour , does your CSV file have headers ? Then just do not refer to the header of the first column in your data map.

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator