I have input data as given below
Date Investment Type Medium 1/1/2000 Mutual Fund, Stocks, Fixed Deposit, Real Estate Own, Online,Through Agent 1/2/2000 Mutual Fund, Stocks, Real Estate Own 1/3/2000 Fixed Deposit Online 1/3/2000 Mutual Fund, Fixed Deposit, Real Estate Through Agent 1/2/2000 Stocks Own, Online, Through Agent
The input to my function is Medium. It could be a single value of a list. I want to search the data based on Medium input and then aggregate the data as given below. For the values in Medium, checkout what the Investment types and then aggregate data for each Investment type
Medium Investment Type Date Own,Online Mutual Fund 1/1/2000,1/2/2000 Own,Online Stocks 1/1/2000,1/2/2000 Own,Online Fixed Deposit 1/1/2000,1/3/2000 Own,Online Real Estate 1/1/2000