我在我的视图和模型中有这样的逻辑,在我的视图中,我得到了用户输入的数据,在我的模型中,我有一个discount_price_formula的自动计算,other_discount_price_formulacan't multiply sequence by non-int of type 'str'。如何解决这个问题?\Users\AppData\Local\Programs\Python\Python37-32\lib
当用户输入购买商品的速率和数量时,我试图计算商品的总价格,但我得到了这个错误:"can't multiply sequence by non-int of type 'tuple'“我的模型如下所示;它包括我执行获取总价格的操作的位置。from django.db import modelsfrom django.db.m
我试图从一个数据帧乘2个数据,但它给出了一个TypeError:在运行代码时不能用'str'类型的非整数乘法序列。我可以知道如何将数据帧数据类型从“pandas.core.series.Series”转换为“int”吗?generatePortfolioStatement(stock): local_df = df
s