我正在尝试从here重新创建this graph
我的代码是:
impute_grps = data.pivot_table(values=["Loan_Status"], index=[ "Credit_History","Gender"],
aggfunc='count')
print (impute_grps)
impute_grps.plot(kind='bar', stacked=True, color=['red','blue'], grid=False)
给出下面的图片。有没有人能告诉我如何按原来的状态分割贷款?我尝试将它添加到索引中,但得到ValueError: Grouper for 'Loan_Status' not 1-dimensional
错误
目前没有回答
相关问题 更多 >
编程相关推荐