emzed.io module¶
This module contains multple functions for readin and writing tables and peakmaps in different formats.
If emzed-gui is installed all functions will open file dialogs as fall-back when the caller does not specify file paths.
- emzed.io.load_csv(path=None, *, delimiter=';', dash_is_none=True)[source]¶
Load CSV file.
- Parameters:
path – Path to the file to load. If not specified and if emzed-gui is installed a user dialog will pop up and ask for the file.
delimiter – CSV field delimiter
dash_is_none – If set to
True
the value-
will be interpreted asNone
(missing value).
- Returns:
- emzed.io.load_csvs(pattern=None, *, delimiter=';', dash_is_none=True)[source]¶
Load multiple CSV files.
- Parameters:
pattern – Globbing pattern (same format as used by
glob.glob()
). If not specified and if emzed-gui is installed a user dialog will pop up and ask for the files. Can also be a folder in case emzed-gui is installed.delimiter – CSV field seperator.
dash_is_none – If set to
True
the value-
will be interpreted asNone
(missing value).
- Returns:
list
ofemzed.Table
instances
- emzed.io.load_excel(path=None)[source]¶
Load Excel file.
- Parameters:
path – Path to the file to load. If not specified and if emzed-gui is installed a user dialog will pop up and ask for the file.
- Returns:
- emzed.io.load_excels(pattern=None)[source]¶
Load multiple excel files.
- Parameters:
pattern – Globbing pattern (same format as used by
glob.glob()
). If not specified and if emzed-gui is installed a user dialog will pop up and ask for the files. Can also be a folder in case emzed-gui is installed.- Returns:
list
ofemzed.Table
instances
- emzed.io.load_peak_map(path=None)[source]¶
Load peak-map.
- Parameters:
path – Path to the file to load. if not specified and if emzed-gui is installed a user dialog will pop up and ask for the file.
- Returns:
- emzed.io.load_peak_maps(pattern=None)[source]¶
Load multiple peak maps.
- Parameters:
pattern – Globbing pattern (same as used for
glob.glob()
). If not specified and if emzed-gui is installed a user dialog will pop up and ask for the files. Can also be a folder in case emzed-gui is installed.- Returns:
list
ofemzed.PeakMap
instances
- emzed.io.load_table(path=None)[source]¶
Load table in
emzed
format.- Parameters:
path – Path to the file to load. if not specified and if emzed-gui is installed a user dialog will pop up and ask for the file.
- Returns:
- emzed.io.load_tables(pattern=None)[source]¶
Load multiple tables in
emzed
format.- Parameters:
pattern – Globbing pattern (same format as used by
glob.glob()
). If not specified and if emzed-gui is installed a user dialog will pop up and ask for the files. Can also be a folder in case emzed-gui is installed.- Returns:
list
ofemzed.Table
instances
- emzed.io.save_csv(table, path=None, *, delimiter=';', as_printed=True, overwrite=False)[source]¶
Save table in
csv
format.- Parameters:
table – Instance of
emzed.Table
.path – Target file location. If not specified and if emzed-gui is installed a user dialog will pop up asking for the destination.
delimiter – CSV format field separator.
as_printed – Uses specified table formats if set to
True
else all cells (also the invisible cells with format set toNone
) will be saved in standard string representation.overwrite – Enforce overwriting if file already exists.
- emzed.io.save_excel(table, path=None, *, overwrite=False)[source]¶
Save table in excel format.
- Parameters:
table – Instance of
emzed.Table
.path – Target file location. If not specified and if emzed-gui is installed a user dialog will pop up asking for the destination.
overwrite – Enforce overwriting if file already exists.
- emzed.io.save_peak_map(peakmap, path=None, *, overwrite=False)[source]¶
Save peak map.
- Parameters:
peakmap – Instance of
emzed.PeakMap
.path – Target file location. If not specified and if emzed-gui is installed a user dialog will pop up asking for the destination.
overwrite – Enforce overwriting if file already exists.
- emzed.io.save_table(table, path=None, *, overwrite=False)[source]¶
Save table in
emzed
format.- Parameters:
table – Instance of
emzed.Table
.path – Target file location. If not specified and if emzed-gui is installed a user dialog will pop up asking for the destination.
overwrite – Enforce overwriting if file already exists.