load: Datagram and table loading routine
Code author: Ueli Sauter, Peter Kraus
The function dgpost.utils.load.load()
processes the below specification
in order to load the datagram json file:
- pydantic model dgbowl_schemas.dgpost.recipe_1_1.load.Load
Show JSON schema
{ "title": "Load", "type": "object", "properties": { "as": { "title": "As", "type": "string" }, "path": { "title": "Path", "type": "string" }, "type": { "title": "Type", "default": "datagram", "enum": [ "datagram", "table" ], "type": "string" }, "check": { "title": "Check", "default": true, "type": "boolean" } }, "required": [ "as", "path" ], "additionalProperties": false }
- field as_: str [Required] (alias 'as')
- field path: str [Required]
- field type: Literal['datagram', 'table'] = 'datagram'
- field check: bool = True
Note
The key as
is not processed by load()
, it should be used by its caller
to store the returned datagram or pd.DataFrame
into the correct variable.
- dgpost.utils.load.load(path, check=True, type='datagram')
- Return type
Union
[dict
,DataFrame
]