iode.Tables
- class iode.Tables(filepath: str = None)[source]
IODE Tables database.
- Parameters:
- filepath: str, optional
file containing the IODE tables to load.
- Attributes:
- filename: str
- description: str
Methods
clear()Delete all objects from the current database.
compare(filepath[, ...])The objects of the current database are compared with those stored in the file filepath.
copy([pattern])Create a new database instance in which each object is a copy of the original object from the global IODE database.
copy_from(input_files[, names])Copy (a subset of) tables from the input file(s) 'input_files' into the current database.
get_name(pos)Return the name of the IODE object at position pos in the database.
get_names([pattern, filepath])Returns the list of objects names given a pattern.
get_names_from_pattern(list_name, pattern, xdim)Generate an IODE list containing the names of objects that match a given pattern.
get_title(key)Get the title of a table from its name or index.
index(name)Return the position of the IODE object with name name in the database.
load(filepath)Load objects stored in file 'filepath' into the current database.
merge(other[, overwrite])Merge the content of the 'other' database into the current database.
merge_from(input_file)Merge all objects stored in the input file 'input_file' into the current database.
Create a new empty detached database.
print_to_file(filepath[, names, format, ...])Print the list tables defined by names to the file filepath using the format format.
remove(names)Delete the object(s) named 'names' from the current database.
rename(old_name, new_name[, overwrite])Rename an object of the database.
save(filepath[, compress])Save objects of the current database into the file 'filepath'.
search(pattern[, word, case_sensitive, ...])Return a list of all objects from the current database having a specific pattern in their names or LEC expression, comment...
subset(pattern, copy)Create a subset of the database filtered by a name pattern.
from_cython_obj
get_instance
- Returns:
- Tables
Examples
>>> from iode import tables, SAMPLE_DATA_DIR >>> tables.load(f"{SAMPLE_DATA_DIR}/fun.tbl") Loading .../fun.tbl 46 objects loaded >>> len(tables) 46 >>> tables Workspace: Tables nb tables: 46 filename: ...\tests\data\fun.tbl name table titles ANAKNFF Déterminants de la croissance de K ANAPRIX Analyse des prix C8_1 Déterminants de l'output potentiel C8_10 Coin salarial parafiscal C8_11 Propension moyenne à épargner ... ... UCLASS Chômage classique UY Taux de chômage XPC Inflation: PC XQBBP Croissance YDH Tableau B-3. Revenu disponible des ménages à prix constant
Methods
__init__([filepath])clear()Delete all objects from the current database.
compare(filepath[, ...])The objects of the current database are compared with those stored in the file filepath.
copy([pattern])Create a new database instance in which each object is a copy of the original object from the global IODE database.
copy_from(input_files[, names])Copy (a subset of) tables from the input file(s) 'input_files' into the current database.
from_cython_obj(obj)get_instance()get_name(pos)Return the name of the IODE object at position pos in the database.
get_names([pattern, filepath])Returns the list of objects names given a pattern.
get_names_from_pattern(list_name, pattern, xdim)Generate an IODE list containing the names of objects that match a given pattern.
get_title(key)Get the title of a table from its name or index.
index(name)Return the position of the IODE object with name name in the database.
load(filepath)Load objects stored in file 'filepath' into the current database.
merge(other[, overwrite])Merge the content of the 'other' database into the current database.
merge_from(input_file)Merge all objects stored in the input file 'input_file' into the current database.
Create a new empty detached database.
print_to_file(filepath[, names, format, ...])Print the list tables defined by names to the file filepath using the format format.
remove(names)Delete the object(s) named 'names' from the current database.
rename(old_name, new_name[, overwrite])Rename an object of the database.
save(filepath[, compress])Save objects of the current database into the file 'filepath'.
search(pattern[, word, case_sensitive, ...])Return a list of all objects from the current database having a specific pattern in their names or LEC expression, comment...
subset(pattern, copy)Create a subset of the database filtered by a name pattern.
Attributes
Return the list of coefficients (scalars) used in the tables of (the subset of) the database.
Description of the current database.
Return the filepath associated with the current database.
Allow to select the ith table in the database.
Return the object type of the current database.
Whether or not any change made on the present database or subset will modify the global IODE workspace.
Whether or not the present database represents the global IODE workspace.
List of names of all objects in the current database.
Number of decimals to print.
Whether to print the full definitions, only the titles or the computed values of the IODE tables in the current database.
Return the list of variables used in the tables of (the subset of) the database.