spinetoolbox.spine_io.importers.gdx_connector
¶
Contains GDXConnector class and a help function.
author: |
|
---|---|
date: | 1.6.2019 |
Module Contents¶
-
spinetoolbox.spine_io.importers.gdx_connector.
select_gdx_file
(parent=None)[source]¶ Launches QFileDialog with .gdx filter
-
class
spinetoolbox.spine_io.importers.gdx_connector.
GdxConnector
[source]¶ Bases:
spinetoolbox.spine_io.io_api.SourceConnection
Template class to read data from another QThread.
-
connect_to_source
(self, source)[source]¶ Connects to given .gdx file.
Parameters: source (str) – path to .gdx file.
-
get_tables
(self)[source]¶ Returns a list of table names.
GAMS scalars are also regarded as tables.
Returns: Table names in list Return type: list(str)
-
get_data_iterator
(self, table, options, max_rows=-1)[source]¶ Creates an iterator for the data source
Parameters: - table (string) – table name
- options (dict) – dict with options
Keyword Arguments: max_rows (int) – ignored
Returns: data iterator, list of column names, number of columns
Return type: tuple
-