- class foxes.utils.PandasFileHelper[source]
This class helps reading and writing data to files via pandas.
Attributes¶
- DEFAULT_READING_PARAMETERS: dict
Default parameters for file reading for the supported file formats
- DEFAULT_WRITING_PARAMETERS: dict
Default parameters for file writing for the supported file formats
- DATA_FILE_FORMAT: list:str
The supported file formats for data export
- DEFAULT_FORMAT_DICT: dict
Default column formatting
Public members¶
-
DEFAULT_READING_PARAMETERS =
{'csv': {}, 'csv.bz2': {}, 'csv.gz': {}, 'csv.zip': {}, 'h5': {}, 'nc': {}}
-
DEFAULT_WRITING_PARAMETERS =
{'csv': {}, 'csv.bz2': {}, 'csv.gz': {}, 'csv.zip': {}, 'h5': {'key': 'foxes', 'mode': 'w'}, 'nc': {}}
-
DEFAULT_FORMAT_DICT =
{'AMB_CAP': '{:.5f}', 'AMB_CT': '{:.6f}', 'AMB_P': '{:.3f}', 'AMB_REWS': '{:.4f}', 'AMB_REWS2': '{:.4f}', 'AMB_REWS3': '{:.4f}', 'AMB_RHO': '{:.5f}', 'AMB_T': '{:.3f}', 'AMB_TI': '{:.6f}', 'AMB_WD': '{:.3f}', 'AMB_WS': '{:.4f}', 'AMB_YAW': '{:.3f}', 'AMB_YLD': '{:.3f}', 'CAP': '{:.5f}', 'CT': '{:.6f}', 'EFF': '{:.5f}', 'P': '{:.3f}', 'REWS': '{:.4f}', 'REWS2': '{:.4f}', 'REWS3': '{:.4f}', 'RHO': '{:.5f}', 'T': '{:.3f}', 'TI': '{:.6f}', 'WD': '{:.3f}', 'WS': '{:.4f}', 'YAW': '{:.3f}', 'YLD': '{:.3f}'}
-
DATA_FILE_FORMATS =
['csv', 'csv.gz', 'csv.bz2', 'csv.zip', 'h5', 'nc']
- classmethod read_file(file_path, **kwargs)[source]
Helper for reading data according to file ending.
-
classmethod write_file(data, file_path, format_dict=
{}
, **kwargs)[source] Helper for writing data according to file ending.