metobs_toolkit.Dataset.save_dataset#
- Dataset.save_dataset(outputfolder=None, filename='saved_dataset.pkl', overwrite=False)[source]#
Save a Dataset instance to a (pickle) file.
- Parameters:
outputfolder (str or None, optional) – The path to the folder to save the file. If None, the outputfolder from the Settings is used. The default is None.
filename (str, optional) – The name of the output file. The default is ‘saved_dataset.pkl’.
overwrite (bool, optional) – If True, the target file will be overwritten if it exist. The default is False.
- Return type:
None.
Examples
>>> import metobs_toolkit >>> import os >>> >>> # Import data into a Dataset >>> dataset = metobs_toolkit.Dataset() >>> dataset.update_settings( ... input_data_file=metobs_toolkit.demo_datafile, ... input_metadata_file=metobs_toolkit.demo_metadatafile, ... template_file=metobs_toolkit.demo_template) >>> >>> dataset.import_data_from_file() >>> >>> # Save dataset to a .pkl file >>> dataset.save_dataset(outputfolder=os.getcwd(), ... filename='your_saved_dataset.pkl', ... overwrite=True) Dataset saved in ...