dgpost.utils package
- dgpost.utils.extract(obj: dict | DataFrame | DataTree | None, spec: dict, index: Index | None = None) DataFrame
- dgpost.utils.transform(table: DataFrame, withstr: str, using: list[dict]) None
- dgpost.utils.load(path: str, check: bool | None = None, type: str = 'netcdf') dict | DataFrame
- dgpost.utils.parse(fn: str) dict[str, Any]
Input file parsing function.
Supports loading
yamlandjsonfiles using the recipe-parsing function and schema provided in thedgbowl_schemas.dgpost.recipemodule.- Parameters:
fn – Path to the filename to be parsed
- Returns:
ret – A dictionary representing the recipe.
- Return type:
dict[str, Any]
- dgpost.utils.save(table: DataFrame, path: str, type: str | None = None, columns: list[str] | None = None, sigma: bool = True, meta: dict | None = None) None
- dgpost.utils.plot(table: DataFrame, ax_args: list[dict], save: dict, style: dict | None = None, fig_args: dict | None = None, **grid_args)
- dgpost.utils.pivot(table: DataFrame, using: str | list[str], columns: list[str] | None = None, timestamp: str = 'first', timedelta: str | None = None) DataFrame
Submodules
- extract: extract and interpolate data into tables
- helpers: helper functions for the
transformpackage element_from_formula()default_element()name_to_chem()columns_to_smiles()electrons_from_smiles()pQ()separate_data()load_data()kwarg_to_quantity()merge_units()combine_tables()arrow_to_multiindex()keys_in_df()key_to_tuple()get_units()set_units()fill_nans()- load: load datagrams and tables
- parse: YAML and JSON input handler
update_recipe()parse()- pivot: reorder tables using columns
- plot: create reproducible plots from tables
- save: save and export tables into files
- transform: transform and calculate data in tables