enter image description hereこれは私のコードです。axis=0
を連結しようとしていますが、このエラーが発生します。すべての列が同じであり、データ型も同じです。TypeError:連結中にninNDFrameオブジェクトを連結できません
私はencoding=ISO-8859-1
を指定する必要がpd.read_csv()
を行っているときに、それはそれの理由かもしれないと思いますが?タイプがデータフレームにではあるが
declinedataforclassification=declinedata[['amount_requested','Risk_Score','dti','State','emp_length','policy_code','app_month']]
loandataforclassification=loandata[['loan_amnt','Risk_Score','dti','addr_state','emp_length','policy_code','issue_month']]
loandataforclassification=loandataforclassification.rename(columns={'loan_amnt':'amount_requested','addr_state':'State','issue_month':'app_month'})
declinedataforclassification['status']=0
loandataforclassification['status']=1
loandataforclassification['amount_requested']=loandataforclassification['amount_requested'].astype(float)
resultdata = loandataforclassification.append('declinedataforclassification',ignore_index=True)
この問題は、dfの名前を引用符で囲んで愚かな間違いをしていたことを発見しました –