cdm_reader_mapper.read_data#
- cdm_reader_mapper.read_data(data_file, mask_file=None, info_file=None, data_format='parquet', imodel=None, col_subset=None, encoding=None, delimiter=None, **kwargs)[source]#
Read MDF data which is already on a pre-defined data model.
- Parameters:
data_file (
str) – The data file (including path) to be read.mask_file (
str, optional) – The validation file (including path) to be read.info_file (
str, optional) – The information file (including path) to be read.data_format (
{"csv", "parquet", "feather"}, default:"parquet") – Format of input data file(s).imodel (
str, optional) – Name of internally available input data model. e.g. icoads_r300_d704col_subset (
str,tupleorlist, optional) – Specify the section or sections of the file to write.For multiple sections of the tables: e.g col_subset = [columns0,…,columnsN]
For a single section: e.g. list type object col_subset = [columns]
Column labels could be both string or tuple.
encoding (
str, optional) – The encoding of the input file. Overrides the value in the imodel schema file.delimiter (
str, optional) – The delimiter used in the input file. Overrides the value in the imodel schema file.
- Return type:
- Returns:
See also
readRead original marine-meteorological data as well as MDF data or CDM tables from disk.
read_mdfRead original marine-meteorological data from disk.
read_tablesRead CDM tables from disk.
writeWrite both MDF data or CDM tables to disk.
write_dataWrite MDF data and validation mask to disk.
write_tablesWrite CDM tables to disk.