Utils#
Module Contents#
Functions#
|
If value is boolean, convert to Green Checkmark or Red X. Otherwise, leave be. |
|
|
|
Filters DataFrame by locations, which can be a list, "ALL" or None |
|
Format interconnection queue data |
|
Get interconnection queue data for all ISOs |
|
Get an ISO by its id |
|
|
|
|
|
|
|
|
|
|
|
Returns whether date is within N days |
|
|
|
List available ISOs |
|
Load a single DataFrame for same schema csv files in a folder |
|
|
|
|
|
|
|
|
|
Move columns to front of DataFrame |
Attributes Summary#
Contents#
- gridstatus.utils.all_isos: list[gridstatus.base.ISOBase][source]#
- gridstatus.utils.convert_bool_to_emoji(value: bool) str[source]#
If value is boolean, convert to Green Checkmark or Red X. Otherwise, leave be.
- gridstatus.utils.download_csvs_from_zip_url(url: str, process_csv: Callable[[pandas.DataFrame, str], pandas.DataFrame] | None = None, verbose: bool = False, strip_whitespace_from_cols: bool = False)[source]#
- gridstatus.utils.filter_lmp_locations(df: pandas.DataFrame, locations: list[str] | None = None, location_type: str | None = None) pandas.DataFrame[source]#
Filters DataFrame by locations, which can be a list, “ALL” or None
- Parameters:
df (pandas.DataFrame) – DataFrame to filter
locations – “ALL” or list of locations to filter “Location” column by
- gridstatus.utils.format_interconnection_df(queue: pandas.DataFrame, rename: dict[str, str], extra: list[str] | None = None, missing: list[str] | None = None) pandas.DataFrame[source]#
Format interconnection queue data
- gridstatus.utils.get_interconnection_queues() pandas.DataFrame[source]#
Get interconnection queue data for all ISOs
- gridstatus.utils.get_iso(iso_id: str) gridstatus.base.ISOBase[source]#
Get an ISO by its id
- gridstatus.utils.is_within_last_days(date: pandas.Timestamp, days: int, tz: str) bool[source]#
Returns whether date is within N days
- gridstatus.utils.load_folder(path: str, time_zone: str | None = None, verbose: bool = True) pandas.DataFrame[source]#
Load a single DataFrame for same schema csv files in a folder
- Parameters:
path (str) – path to folder
time_zone (str) – time zone to localize to timestamps. By default returns as UTC
verbose (bool, optional) – print verbose output. Defaults to True.
- Returns:
A DataFrame of all files
- Return type:
pandas.DataFrame