cdm_reader_mapper.read_data

Contents

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_d704

  • col_subset (str, tuple or list, 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:

DataBundle

Returns:

cdm_reader_mapper.DataBundle

See also

read

Read original marine-meteorological data as well as MDF data or CDM tables from disk.

read_mdf

Read original marine-meteorological data from disk.

read_tables

Read CDM tables from disk.

write

Write both MDF data or CDM tables to disk.

write_data

Write MDF data and validation mask to disk.

write_tables

Write CDM tables to disk.