U0
Size: a a a
ТМ
TM
#def for changing values in df['steel']
def stl_reg(steel_mark) -> str:
data = re.search(r'\b\w*[^-]*\b', steel_mark).group(0)
return data
#try applay stl_reg
correct_df['steel'] = correct_df['steel'].map(stl_reg)
correct_df['steel']
Out[]:
0 pandas.core.strings.StringMethods object at 0x...
1 pandas.core.strings.StringMethods object at 0x...
2 pandas.core.strings.StringMethods object at 0x...
3 pandas.core.strings.StringMethods object at 0x...
#etc.
TM
AA
U0
АЛ
EZ
Model
prediction_list = relationship('Predictions')
@hybrid_property
def first_prediction(self):
return self.prediction_list[0]
# здесь возникают проблемы
# необходимо настроить сортировку по вложенному свойству `some_prediction_property` массива prediction_list
Model.query.order_by(Model.first_prediction.some_prediction_property.asc())FH
U0