pandas_openscm.io#
Serialisation/deserialisation (i.e. input/output) support
Functions:
| Name | Description |
|---|---|
load_timeseries_csv |
Load a CSV holding timeseries |
load_timeseries_csv #
load_timeseries_csv(
fp: Path,
lower_column_names: bool = True,
index_columns: list[str] | None = None,
out_columns_type: type | None = None,
out_columns_name: str | None = None,
) -> DataFrame
Load a CSV holding timeseries
In other words, a CSV that has metadata columns and then some time columns.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fp
|
Path
|
File path to load |
required |
lower_column_names
|
bool
|
Convert the column names to all lower case as part of loading. Note, if |
True
|
index_columns
|
list[str] | None
|
Columns to treat as metadata from the loaded CSV. At the moment, if this is not provided, a |
None
|
out_columns_type
|
type | None
|
The type to apply to the output columns that are not part of the index. If not supplied, the raw type returned by pandas is returned. |
None
|
out_columns_name
|
str | None
|
The name for the columns in the output. If not supplied, the raw name returned by pandas is returned. This can also be set with pd.DataFrame.rename_axis but we provide it here for convenience (and in case you couldn't find this trick for ages, like us). |
None
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
Loaded data |