I have dataframe like df
Name | cost | ID |
---|---|---|
john | 300.0 | A1 |
ram | 506.0 | B2 |
sam | 300.0 | C4 |
Adam | 289.0 | 1 |
I need to print output as below
Name | cost | ID | Keyword |
---|---|---|---|
john | 300 | A1 | RF |
ram | 506 | B2 | DD |
sam | 300 | C4 | RF |
Adam | 289 | 1 | Shared |
- i want to create a new column with condition like if ID has integer values then in Keywords it should be Shared. If ID=A1 the Keyword=RF...etc