How to traverse into components of a model? #356
-
Hi, i am trying to traverse in all the components which are of constant type, and get their value. I was trying something like:
"but the components object is not iterable" What is the proper way accessing the components? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @lagamura,
The previous example iterated over all the components. You can get only the constant variables using the
|
Beta Was this translation helpful? Give feedback.
Hi @lagamura,
model.components
is a class that manages the components, that is why you cannot iterate over it.I recommend you to use the model documentation to iterate over the components, it is a
pandas.DataFrame
, for example (teacup.mdl
):