
Product
Introducing .NET Support in Socket
Socket now supports .NET, bringing supply chain security and SBOM accuracy to NuGet and MSBuild-powered C# projects.
A Python package for reading data from the Inputs, Assumptions and Scenarios Report (IASR) Microsoft Excel workbook published by the Australian Energy Market Operator for use in their Integrated System Plan modelling.
A Python package for reading data from the Inputs, Assumptions and Scenarios Report (IASR) Microsoft Excel workbook published by the Australian Energy Market Operator for use in their Integrated System Plan modelling.
pip install isp-workbook-parser
Parser
(see examples below).
workbooks/<version>
.src/config/<version>
Parser
loads the MS Excel workbook and, by default, will check if the version of the workbook is supported by seeing if configuration files are included in the package for that version.Parser
can use these configuration files to parse the data tables and save them as CSVs.[!NOTE] This package makes some opinionated decisions when processing tables. For example, multiple header row tables are reduced to a single header, data in merged cells is inferred from surrounding cells, and notes and footnotes are dropped (amonst other ways in which the data is sanitised). For more detail, refer to the docstring and code in
read_table.py
andsanitisers.py
.
name
: the table namesheet_name
: the sheet where the table is located
header_rows
: this specifies the Excel row(s) with table column names
6
)[6, 7, 8]
)end_row
: the last row of table datacolumn_range
: the Excel column range of the table in alphabetical/Excel format, e.g. "B:F"
skip_rows
: optional, Excel row(s) in the table that should not be read in
15
)[15, 16]
)columns_with_merged_rows
: optional, Excel column(s) with merged rows
"B"
),["B", "D"]
)forward_fill_values
: optional, specifies whether table values should be forward filled
True
to handle merged cells in tablesFalse
where there are empty columnsRefer to the contributing instructions for details on how to contribute table configuration (YAML) files to this repository and package.
Export all the data tables the package has a config file for to CSV files.
from isp_workbook_parser import Parser
workbook = Parser("<path/to/workbook>/2024-isp-inputs-and-assumptions-workbook.xlsx")
workbook.save_tables('<path/to/output directory>')
Return a dictionary of table names, with lists of tables names stored under a key which is their sheet name in the workbook. For a given workbook version, this only returns tables the package has a configuration file for.
from isp_workbook_parser import Parser
workbook = Parser("<path/to/workbook>/2024-isp-inputs-and-assumptions-workbook.xlsx")
names = workbook.get_table_names()
names['Build limits']
Get a single table as a pandas DataFrame
.
from isp_workbook_parser import Parser
workbook = Parser("<path/to/workbook>/2024-isp-inputs-and-assumptions-workbook.xlsx")
table = workbook.get_table("retirement_costs")
Get a table by directly providing the table config.
from isp_workbook_parser import Parser, TableConfig
workbook = Parser("<path/to/workbook>/2024-isp-inputs-and-assumptions-workbook.xlsx")
table_config = TableConfig(
name="table_name",
sheet_name="sheet_name",
header_rows=5,
end_row=21,
column_range="B:J",
)
workbook.get_table_from_config(table_config)
Interested in contributing to the source code or adding table configurations? Check out the contributing instructions, which also includes steps to install isp-workbook-parser
for development.
Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.
isp-workbook-parser
was created as a part of the OpenISP project. It is licensed under the terms of GNU GPL-3.0-or-later licences.
FAQs
A Python package for reading data from the Inputs, Assumptions and Scenarios Report (IASR) Microsoft Excel workbook published by the Australian Energy Market Operator for use in their Integrated System Plan modelling.
We found that isp-workbook-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports .NET, bringing supply chain security and SBOM accuracy to NuGet and MSBuild-powered C# projects.
Research
Malicious npm packages posing as Telegram bot libraries install SSH backdoors and exfiltrate data from Linux developer machines.
Security News
pip, PDM, pip-audit, and the packaging library are already adding support for Python’s new lock file format.