Create new column based on conditions of existing column

Viewed 9

The dataset is based on a multiple choice question 'Which of the following investing platforms do you use to invest? [Select all that apply].

I need to:

(1)label each broker name as 2 different types: 'neo' or 'legacy'

(2)create a new column based on the label. The new column should have the 3 labels: 'use at least one neo and one legacy', or 'legacy only', or 'neo only'.


The part of the dataset looks like below (each cell contain multiple broker names):

enter image description here


The definition of the 2 different types: 'neo' or 'legacy'

legacy=['AJ Bell', 'Aviva Investors', 'Barclays StockBrokers', 'Charles Stanley Direct', 'Close Brothers', 'Fidelity International', 'Halifax', 'Hargreaves Lansdown', 'HSBC','IG', 'Interactive Brokers','Interactive Investor','Quilter', 'Santander', 'Tilney BestInvest','Vanguard', 'X-O']

Neo=['Chip','CIRCA5000','Freetrade','Lightyear','MoneyBox','MoneyFarm','Nutmeg','Plum','Shares','Stake','Wealthify','Wombat']


HOW to create a new column with three different categories value: 'use at least one neo and one legacy', or 'legacy only', or 'neo only'

0 Answers
Related