FICO
FICO Xpress Optimization Examples Repository
FICO Optimization Community FICO Xpress Optimization Home
Back to examples browserPrevious exampleNext example

Dataframe formats

Description

This example demonstrates dataframe-style representation of data. This functionality is provided for CSV format files via the 'diskdata' I/O driver and subroutine of module mmetc, for the spreadsheet I/O drivers 'xls', 'xlsx', and 'csv' of module mmsheet, and for databases accessed through an ODBC connection via SQL commands.

  • dataframecsv.mos: reading and writing dataframes for CSV format data via 'diskdata'
  • dataframedb.mos: dataframe-style reading of database tables via 'SQLdataframe'
  • dataframesht.mos: reading and writing dataframes for spreadsheets and CSV format data via mmsheet
Further explanation of this example: Whitepaper 'Using ODBC and other database interfaces with Mosel', Section Examples - Working with dataframe formats


Source Files
By clicking on a file name, a preview is opened at the bottom of this page.
dataframecsv.mos[download]
dataframedb.mos[download]
dataframesht.mos[download]

Data Files





dframedata.csv

StrField,NumField,IntField,BoolField,TxtField,DateField
AB,1.5,2,TRUE,some more text,31/01/2024
ab,3.2,4,FALSE,another text,29/02/2024
Cb,5.7,7,FALSE,more text,31/12/2023
BB,2.4,5,TRUE,a text,22/07/2022

Back to examples browserPrevious exampleNext example