Answers for "add two coloumns and set in another column"

1

how to add coloumn based on other column

metadata['class_pnemonia'] = metadata['class'].astype('category').map({0: 'HEALTHY ', 1: 'PNEUMONIA'})
Posted by: Guest on August-09-2021
0

new column with addition of other columns

df['C'] = df.apply(lambda row: row['A'] + row['B'], axis=1)
Posted by: Guest on September-11-2021

Code answers related to "add two coloumns and set in another column"

Browse Popular Code Answers by Language