ipython dataframe怎么添加新的一列(c列),c列有条件,就是如果a列的值>=60,c=a+10。如果a列<60,c=0。怎么编程?
这样就行
scores['c'] = np.where(scores['a']>= 60, scores['a']+10, 0)