File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 133133OPERATION_TYPE = "operationType"
134134#: Column in the condition table with the new value of the target entity
135135TARGET_VALUE = "targetValue"
136- # opeartion types:
136+ # operation types:
137137OT_CUR_VAL = "setCurrentValue"
138138OT_NO_CHANGE = "noChange"
139139
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ def validate_id(cls, v):
144144 mode = "before" ,
145145 )
146146 @classmethod
147- def convert_nan_to_none (cls , v , info : ValidationInfo ):
147+ def convert_nan_to_default (cls , v , info : ValidationInfo ):
148148 if isinstance (v , float ) and np .isnan (v ):
149149 return cls .model_fields [info .field_name ].default
150150 return v
@@ -177,7 +177,7 @@ def __getitem__(self, observable_id: str) -> Observable:
177177 raise KeyError (f"Observable ID { observable_id } not found" )
178178
179179 @classmethod
180- def from_dataframe (cls , df : pd .DataFrame ) -> ObservablesTable :
180+ def from_df (cls , df : pd .DataFrame ) -> ObservablesTable :
181181 if df is None :
182182 return cls (observables = [])
183183
@@ -188,7 +188,7 @@ def from_dataframe(cls, df: pd.DataFrame) -> ObservablesTable:
188188
189189 return cls (observables = observables )
190190
191- def to_dataframe (self ) -> pd .DataFrame :
191+ def to_df (self ) -> pd .DataFrame :
192192 return pd .DataFrame (self .model_dump ()["observables" ])
193193
194194 @classmethod
You can’t perform that action at this time.
0 commit comments