iode.Identities.to_series

Identities.to_series() Series[source]

Create a pandas Series from the current Identities database. The index of the returned Series is build from the Identities names.

Examples

>>> from iode import SAMPLE_DATA_DIR, identities
>>> import pandas as pd
>>> identities.load(f"{SAMPLE_DATA_DIR}/fun.idt")
Loading .../fun.idt
48 objects loaded 
>>> len(identities)
48
>>> # Export the IODE Identities database as a pandas Series
>>> s = identities.to_series()
>>> len(s)
48
>>> s.index.to_list()
['AOUC', 'AOUC_', 'FLGR', ..., 'XW', 'Y', 'YSEFPR', 'YSFICR']
>>> identities["GAP_"]
Identity('100*((QAF_/Q_F)-1)')
>>> s["GAP_"]
'100*((QAF_/Q_F)-1)'
>>> identities["XTFP"]
Identity('grt TFPFHP_')
>>> s["XTFP"]
'grt TFPFHP_'
>>> # Export a subset of the IODE Identities database as a pandas Series
>>> s = identities["X*;*_"].to_series()
>>> len(s)
15
>>> s.index.to_list()
['AOUC_', 'GAP_', 'XEX', 'XNATY', ..., 'XTFP', 'XW']
>>> identities["GAP_"]
Identity('100*((QAF_/Q_F)-1)')
>>> s["GAP_"]
'100*((QAF_/Q_F)-1)'
>>> identities["XTFP"]
Identity('grt TFPFHP_')
>>> s["XTFP"]
'grt TFPFHP_'