Reputation: 11
Dataframe structure:
df = pd.DataFrame([[1,2,3], ['Active','Deleted','Active'], [np.nan,2,np.nan]],
columns=list('ABC'))
If value of column B is 'Deleted' then I want to copy value for column A into column C else keep it Nan. How can I do it in pandas?
Upvotes: 0
Views: 57