iode.Scalars

class iode.Scalars

IODE Scalars database.

Parameters:
filepath: str, optional

file containing the IODE scalars to load.

Returns:
Scalars

Examples

>>> from iode import scalars, SAMPLE_DATA_DIR
>>> scalars.load(f"{SAMPLE_DATA_DIR}/fun.scl")
>>> len(scalars)
161
>>> scalars         
Workspace: Scalars
nb scalars: 161
filename: ...\tests\data\fun.scl

 name        value  relax    std
acaf1        0.0158 1.0000  0.0014
acaf2       -0.0000 1.0000  0.0000
acaf3        2.5026 1.0000  0.8730
acaf4       -0.0085 1.0000  0.0021
dlnpaf       0.9000 1.0000      na
...             ...    ...     ...
y6           0.0000 0.0000  0.0000
y7          -0.1550 1.0000  0.3239
zkf1         0.2011 1.0000  0.3757
zkf2         0.7921 1.0000  0.1812
zkf3        -7.2712 1.0000  2.6764
Attributes:
filename: str
description: str

Methods

clear(self)

Delete all objects from the current database.

copy(self)

Create a copy of an IODE database.

copy_from(self, input_files[, objects_names])

Copy (a subset of) objects from the input file(s) 'input_files' into the current database.

from_frame(self, df)

Copy the pandas DataFrame df into the IODE Scalars database.

from_series(self, s)

Copy the pandas Series s into the IODE Scalars database.

get_names(self[, pattern])

Returns the list of objects names given a pattern.

is_copy_subset(self)

Whether or not the present object represents of a subset of a global IODE database and if the IODE objects of the subset represent deep copies of the IODE objects from the global IODE database.

is_subset(self)

Whether or not the present object represents a subset of a global IODE database.

load(self, filepath)

Load objects stored in file 'filepath' into the current database.

merge(self, other[, overwrite])

merge_from(self, input_file)

Merge all objects stored in the input file 'input_file' into the current database.

remove(self, names)

Delete the object(s) named 'names' from the current database.

rename(self, old_name, new_name)

Rename an object of the database.

save(self, filepath)

Save objects of the current database into the file 'filepath'.

search(self, pattern[, word, ...])

Return a list of all objects from the current database having a specific pattern in their names or LEC expression, comment...

to_frame(self)

Create a pandas DataFrame from the current Scalars database.

__init__(*args, **kwargs)

Methods

__init__(*args, **kwargs)

clear(self)

Delete all objects from the current database.

copy(self)

Create a copy of an IODE database.

copy_from(self, input_files[, objects_names])

Copy (a subset of) objects from the input file(s) 'input_files' into the current database.

from_frame(self, df)

Copy the pandas DataFrame df into the IODE Scalars database.

from_series(self, s)

Copy the pandas Series s into the IODE Scalars database.

get_names(self[, pattern])

Returns the list of objects names given a pattern.

is_copy_subset(self)

Whether or not the present object represents of a subset of a global IODE database and if the IODE objects of the subset represent deep copies of the IODE objects from the global IODE database.

is_subset(self)

Whether or not the present object represents a subset of a global IODE database.

load(self, filepath)

Load objects stored in file 'filepath' into the current database.

merge(self, other[, overwrite])

merge_from(self, input_file)

Merge all objects stored in the input file 'input_file' into the current database.

remove(self, names)

Delete the object(s) named 'names' from the current database.

rename(self, old_name, new_name)

Rename an object of the database.

save(self, filepath)

Save objects of the current database into the file 'filepath'.

search(self, pattern[, word, ...])

Return a list of all objects from the current database having a specific pattern in their names or LEC expression, comment...

to_frame(self)

Create a pandas DataFrame from the current Scalars database.

Attributes

description

description: str

df

df: DataFrame

filename

filename: str

names

names: List[str]