mdf_reader
¶
Subpackages¶
Package Contents¶
Attributes¶
-
read
(source, data_model=None, data_model_path=None, sections=None, chunksize=None, skiprows=None, out_path=None)¶ Reads a data file to a pandas DataFrame using a pre-defined data model. Read data is validates against its data model producing a boolean mask on output.
The data model needs to be input to the module as a named model (included in the module) or as the path to a valid data model.
- Parameters
source (str) – The file path to read
- Keyword Arguments
data_model (str, optional) – Name of internally available data model
data_model_path (str, optional) – Path to external data model
sections (list, optional) – List with subset of data model sections to outpu (default is all)
chunksize (int, optional) – Number of reports per chunk (default is no chunking)
skiprows (int, optional) – Number of initial rows to skip from file (default is 0)
out_path (str, optional) – Path to output data, valid mask and attributes (default is no output)
- Returns
output – Attributes data, mask and atts contain the corresponding information from the data file.
- Return type
object
Note
This module can also be run as a script, with the keyword arguments as name_arg=arg