python中if语句的语法要求,Python If语句语法E

目前由于这个语法错误,错误被张贴在下面的代码。在@property

def data_rows(self):

for d in rlgenevautils.to_csv_dict(self.data_file):

trade_dt = rlcore.str2dt(d['EventDate'])

settle_dt = rlcore.str2dt(d['ActualSettleDate'])

yield (str(d['_UDF_SGCP_ID_'])

,str(d['_UDF_Execution_ID_'])

,str(d['_UDF_PB_ID_'])

,str(d['_UDF_Fund_Admin_ID_'])

,str(d['_Portfolio_NameSort_'])

,str(d['_Strategy_Code_'])

,str(d['_LocationAccount_NameSort_'])

,str(d['_Broker_NameSort_'])

,str(d['_Investment_Code_'])

,trade_dt.isoformat(' ')

,settle_dt.isoformat(' ')

,rlcore.str2float(d['ABSQuantityForCalcCurrentFace'])

,max(rlcore.str2float(d['ABSQuantityForCalcCurrentFace']),rlcore.str2float(d['OriginalFace']))

,rlcore.str2float(d['ABSQuantityForCalcCurrentFace'])/max(rlcore.str2float(d['ABSQuantityForCalcCurrentFace']),rlcore.str2float(d['OriginalFace']))

,rlcore.str2float(d['Price'])

,rlcore.str2float(d['ABSAccruedInterestForCalcCurrentFace'])

,if str(d['_Investment_InvestmentGroup_']) == "AssetBacked":

rlcore.str2float(d['ABSQuantityForCalcCurrentFace']) * rlcore.str2float(d['Price']) / 100

else:

rlcore.str2float(d['NetCashAmount'])

,rlcore.str2float(d['ABSAccruedInterestForCalcCurrentFace']) + rlcore.str2float(d['txtNetCashPreAccrued'])

)

Traceback (most recent call last):

File ".\sg\rec_and_liquidity\geneva_trade.py", line 64

,if str(d['_Investment_InvestmentGroup_']) == "AssetBacked":

^

上面的代码,无法确定if语句的语法错误是什么。错误消息将很快粘贴为注释

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值