[英]Assigning a variable in jupyter-notebook
how to assign a variable target
with the Loan_Status
feature from mydata
dataframe如何使用
mydata
dataframe 中的Loan_Status
功能分配变量target
target = mydata[]
Check out how dictionary works in python: Python dictionaries查看字典在 python 中的工作原理: Python 字典
You probably want something like:你可能想要这样的东西:
target = mydata['Loan_Status']
If you are not sure, if Loan_status
is the correct key, you can print out all keys with DataFrame.keys() :如果您不确定,如果
Loan_status
是正确的密钥,您可以使用DataFrame.keys()打印出所有密钥:
print(mydata.keys())
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.