DataFort I/O Module
This module provides I/O operations for data frames including CSV reading/writing and console output.
df_write_csv(df, filename) - Export data frame to CSV filedf_read_csv(df, filename, has_headers) - Import CSV file into data framedf_write_console(df, unit) - Display data frame in consoleAdd a column with automatic type detection
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(data_frame), | intent(inout) | :: | df | |||
| character(len=*), | intent(in), | dimension(:) | :: | data_strings | ||
| character(len=*), | intent(in), | optional, | dimension(:) | :: | headers | |
| integer, | intent(in) | :: | col_index | |||
| logical, | intent(in) | :: | has_headers |
Import CSV file into data frame
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(data_frame), | intent(inout) | :: | df | |||
| character(len=*), | intent(in) | :: | filename | |||
| logical, | intent(in) | :: | has_headers |
Display data frame in console
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(data_frame), | intent(in) | :: | df | |||
| integer, | intent(in), | optional | :: | unit |
Export data frame to CSV file
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(data_frame), | intent(in) | :: | df | |||
| character(len=*), | intent(in) | :: | filename |
Parse a CSV line into fields
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | line | |||
| character(len=100), | intent(out), | allocatable | :: | fields(:) |