wd_fk['名单类型'] = wd_fk.apply(lambda x: '能人贷' if (x['客户类型'] in ['capable'] and x['名单类型'] not in ['无']) else x['名单类型'],axis = 1 )
.shape函数
df.shape 会将DataFrame的行数和列数返回回来
其中df.shape[0]代表着数据有几行、df.shape[1]代表着数据有几列
wd_fk['名单类型'] = wd_fk.apply(lambda x: '能人贷' if (x['客户类型'] in ['capable'] and x['名单类型'] not in ['无']) else x['名单类型'],axis = 1 )
df.shape 会将DataFrame的行数和列数返回回来
其中df.shape[0]代表着数据有几行、df.shape[1]代表着数据有几列