iode.Lists

class iode.Lists(filepath: str = None)[source]

IODE Lists database.

Parameters:
filepath: str, optional

file containing the IODE lists 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) lists from the input file(s) 'input_files' into the current database.

from_series(s)

Copy the pandas Series s into the IODE Lists 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.

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.

new_detached()

Create a new empty detached database.

print_to_file(filepath[, names, format])

Print the list IODE lists 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.

to_series()

Create a pandas Series from the current Lists database.

from_cython_obj

get_instance

Returns:
Lists

Examples

>>> from iode import lists, SAMPLE_DATA_DIR
>>> lists.load(f"{SAMPLE_DATA_DIR}/fun.lst")
Loading .../fun.lst
17 objects loaded 
>>> len(lists)
17
>>> lists
Workspace: Lists
nb lists: 17
filename: ...\tests\data\fun.lst
description: Modèle fun

   name                                                    lists
COPY        $COPY0; $COPY1
COPY0       ACAF; ACAG; AOUC; AQC; BENEF; BQY; BVY; CGU; COEFON; COTRES; DPU; DPUF; DPUG; DPUGO; DPUH; DPUU;
            DTF; DTH; DTH1; DTH1C; EXC; EXCC; FLF; FLG; GAP; GOSF; GOSG; GOSH; GOSH_; IDF; IDG; IDH; IFU; IHU;
            IT; ITCEE; ITCR; ITD; ITEP; ITF; ITF5; ITFC; ITFGI; ITFGO; ITFQ; ITGR; ITI5R; ITIFR; ITIGR; ITM;
            ITMQ; ITMQR; ITNQ; ITON; ITONQ; ITPL; ITPR; ITPS; ITT; IUG; KN5; KNF; KNFF; KNFFY; KNFY; KNI; KNIY;
            NFY; NFYH; OCUF; OCUG; OCUH; PAF_; PAG; PAH; PBBP; PBNP; PC; PC_; PDPUG; PFI; PFI_; PFND; PG; PI5;
            PIF; PIG; PM; PMAB; PME; PMS; PMT; PQOG; PW3; PWBG; PX; PXAB; PXB; PXE; PXS; PXT; QAF; QAFF; QAFF_;
            QAF_; QAG; QAH; QAI_; QAT; QAT_; QBBP; QBBPPOT_; QBBP_B; QBBP_P; QBNP; QC; QC_; QFND; QG; QGO; QI;
            QI5; QIF; QIG; QM; QMAB; QME; QMS; QMT; QQMAB_; QS; QX; QXAB; QXB; QXE; QXS; QXT; Q_F; Q_I; RIDG;
            RIDGG; RIPBE; RLBE; RLBERHP; RSBE; SBF; SBF3L; SBG; SBH; SF; SG; SH; SSF; SSF3; SSF3L; SSF3P;
            SSFDOM; SSFF; SSFFIC; SSFG; SSH; SSH3GP; SSH3O; SSH3P; SSH3W; SSH3WA; SSH3WW; SSH3ZA; SSH3ZW; SSHFF;
            SUBCEE; TWG; TWGP; ULCP; UY; VAF; VAFF; VAFF_; VAG; VAH; VAI; VAI_; VAMARE; VAT; VAT_; VBBP; VBBP_B;
            VBBP_P; VBNP; VBNP_B; VBNP_I; VBNP_P; VC; VC_; VI; VI5; VIF; VM
COPY1       VMAB; VME; VMK; VMN; VMS; VMT; VS; VS_; VX; VXAB; VXB; VXE; VXK; VXN; VXS; VXT; WBF; WBF_; WBG;
            WBGO; WBGP; WBU; WBU_; WCF; WCF_; WDOM; WG; WIND; WIND_; WLCP; WNF; WNF_; YDH; YDH_; YDTG; YIDG; YK;
            YN; YSEFP; YSEFT1; YSEFT2; YSFIC; YSSF; YSSG; ZF; ZJ; ZKF; ZZF_; DPUHO; EFMY; EFXY; EX; EXCCR; HF;
            ITCEEM; ITDR; ITEPR; ITF5R; ITFGR; ITFIGR; ITMR; ITNQHP; KLFHP; KNFFO; NATY; NDOMY; NGY; NIY; PCO;
            PI5O; PIFO; PIGO; PMABO; PMDVD; PMINTP; PMSO; PMTO; POIL; PRDAL; PROF; PROIHP_; PWMAB; PWMS; PWXAB;
            PWXS; PXABO; PXSO; PXTO; QAGHP; QAHHP; QAI; QCO; QI5O; QMABO; QMEO; QMSO; QMTO; QOUG; QSO; QS_;
            QWXSS; QWXS; QXABO; QXEO; QXSO; QXTO; RIPBEO; SSF3PR; SSH3RO; SSH3RW; SSHRZW; SSRDOM; SUB; SUBR;
            TFPFHP_; TIME; TVACEE; TWGR; ULAG; ULCPO; ULIL; ULIO; VAF_; VAIO; VATPC; VKF; VKFF; VSO; VS_O; VXKO;
            VXNO; ZKFO; BRUGP; VK5; SSFFX
ENDO        $endo0; $endo1
ENDO0       ACAF; ACAG; AOUC; AQC; BENEF; BQY; BVY; CGU; COEFON; COTRES; DEBT; DPU; DPUF; DPUG; DPUGO; DPUH;
            DPUU; DTF; DTH; DTH1; DTH1C; EXC; EXCC; FLF; FLG; FLGR; GAP; GOSF; GOSG; GOSH; GOSH_; IDF; IDG; IDH;
            IFU; IHU; IT; ITCEE; ITCR; ITD; ITEP; ITF; ITF5; ITFC; ITFGI; ITFGO; ITFQ; ITGR; ITI5R; ITIFR;
            ITIGR; ITM; ITMQ; ITMQR; ITNQ; ITON; ITONQ; ITPL; ITPR; ITPS; ITT; IUG; KL; KLHP; KN5; KNF; KNFF;
            KNFFY; KNFY; KNI; KNIY; NFY; NFYH; OCUF; OCUG; OCUH; PAF_; PAG; PAH; PBBP; PBNP; PC; PC_; PDPUG;
            PFI; PFI_; PFND; PG; PI5; PIF; PIG; PM; PMAB; PME; PMS; PMT; PQOG; PROD; PW3; PWBG; PX; PXAB; PXB;
            PXE; PXS; PXT; QAF; QAFF; QAFF_; QAF_; QAG; QAH; QAI_; QAT; QAT_; QBBP; QBBPPOT_; QBBP_B; QBBP_P;
            QBNP; QC; QC_; QFND; QG; QGO; QI; QI5; QIF; QIG; QL; QM; QMAB; QME; QMS; QMT; QQMAB_; QS; QX; QXAB;
            QXB; QXE; QXS; QXT; Q_F; Q_I; RDEBT; RENT; RIDG; RIDGG; RIPBE; RLBE; RLBER; RLBERHP; RSBE; SBF;
            SBF3L; SBG; SBGX; SBH; SF; SG; SH; SSF; SSF3; SSF3L; SSF3P; SSFDOM; SSFF; SSFFIC; SSFG; SSH; SSH3GP;
            SSH3O; SSH3P; SSH3W; SSH3WA; SSH3WW; SSH3ZA; SSH3ZW; SSHFF; SUBCEE; TWG; TWGP; ULCP; UY; VAF; VAFF;
            VAFF_; VAG; VAH; VAI; VAI_; VAMARE; VAT; VAT_; VBBP; VBBP_B; VBBP_P; VBNP; VBNP_B
...         ...
TOTAL1      VBNP_I; VBNP_P; VC; VC_; VI; VI5; VIF; VM; VMAB; VME; VMK; VMN; VMS; VMT; VS; VS_; VX; VXAB; VXB;
            VXE; VXK; VXN; VXS; VXT; WBF; WBF_; WBG; WBGO; WBGP; WBU; WBU_; WCF; WCF_; WCRH; WDOM; WG; WIND;
            WIND_; WLCP; WNF; WNF_; YDH; YDH_; YDTG; YIDG; YK; YN; YSEFP; YSEFT1; YSEFT2; YSFIC; YSSF; YSSG; ZF;
            ZJ; ZKF; ZZF_; DPUHO; DTFX; DTHX; EFMY; EFXY; EX; EXCCR; HF; ITCEEM; ITCRX; ITDR; ITEPR; ITF5R;
            ITFGR; ITFIGR; ITMR; ITNQHP; IUGR; KLFHP; KNFFO; NATY; NDOMY; NGY; NIY; OCP; PCO; PI5O; PIFO; PIGO;
            PMABO; PMDVD; PMINTP; PMSO; PMTO; POIL; PRDAL; PROF; PROIHP; PWMAB; PWMS; PWXAB; PWXS; PXABO; PXSO;
            PXTO; QAGHP; QAHHP; QAI; QCO; QI5O; QMABO; QMEO; QMSO; QMTO; QOUG; QSO; QS_; QWXAB; QWXS; QXABO;
            QXEO; QXSO; QXTO; Q_; RIPBEO; SBGXR; SSF3PR; SSH3RO; SSH3RW; SSHKB; SSHRZW; SSRDOM; SUB; SUBR_;
            TFPFHP; TFPFHP_; TIME; TVACEE; TWGR; ULAG; ULCPO; ULIL; ULIO; VAF_; VAIO; VATPC; VKF; VKF5; VKFF;
            VSO; VS_O; VXKO; VXNO; WBFRXX; WBGR; YSEFPR; YSFICR; ZKFO
XENVI       XEX; XPWMAB; XPWMS; XPWXAB; XPWXS; XQWXAB; XQWXS; XPOIL; XNATY; XTFP
XSCENARIO   XQWXSS; XPWXAB; XPWMAB; XRLBER; XRSBER; XNATY; XTFP; SBGXR; DTFX; DTHX
_SCAL       acaf1; acaf2; acaf3; dlnpaf; dpuh_1; dpuh_2; dtf0; dtf1; ifu_1; ifu_2; kl1; kl10; kl11; kl12; kl13;
            kl14; kl2; knf2; knf3; knff0; knff1; nfyh1; nfyh10; nfyh11; nfyh2; nfyh3; nfyh4; pc0; pc1; pc2; pc4;
            pc5; pc6; pif_1; pif_2; pif_3; pmab0; pmab1; pmab4; pmab6; pms0; pms1; pms3; pxab1; pxs1; pxs2;
            pxs3; pxs4; qc0_; qc1_; qc2_; qc3_; qc4_; qc5_; qi5_1; qi5_2; qi5_3; qi5_4; qi5_5; qmab_1; qmab_10;
            qmab_2; qmab_4; qmab_5; qme_1; qme_2; qme_3; qms1; qms2; qms3; qms4; qmt_1; qmt_2; qmt_3; qxab0;
            qxab1; qxab2; qxab3; qxs0; qxs1; qxs2; qxs3; qxs4; qxs5; qxt0; qxt1; qxt2; qxt3; sbf3l_0; sbf3l_1;
            vah_1; vah_2; vah_3; vai1_; vai2_; vai3_; vai4_; vmn_1; vmn_2; vmn_3; vs0_; vs1_; vs2_; vs3_; vxn_1;
            vxn_2; vxn_3; zkf1; zkf2; zkf3
_SEARCH     ZKF
__init__(filepath: str = None)[source]

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) lists from the input file(s) 'input_files' into the current database.

from_cython_obj(obj)

from_series(s)

Copy the pandas Series s into the IODE Lists database.

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.

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.

new_detached()

Create a new empty detached database.

print_to_file(filepath[, names, format])

Print the list IODE lists 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.

to_series()

Create a pandas Series from the current Lists database.

Attributes

description

Description of the current database.

filename

Return the filepath associated with the current database.

i

Allow to select the ith list in the database.

iode_type

Return the object type of the current database.

is_detached

Whether or not any change made on the present database or subset will modify the global IODE workspace.

is_global_workspace

Whether or not the present database represents the global IODE workspace.

names

List of names of all objects in the current database.

series

Create a pandas Series from the current Lists database.