![](/img/trans.png)
[英]how to save output of if elif statement to new variable in python dataframe?
[英]How to save the statement which is given in elif in a variable
如何将 elif 中给出的语句保存在变量中,例如:
elif 'date'in calendar:
Date()
我想将日期字保存在 elif 的变量中
date = None
...
elif 'date' in calendar:
date = Date()
您可以将其分配给变量,例如:
elif 'date' in calendar:
date = Date()
在添加剩余的 if 部分之前。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.