[英]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.