Data that I have:
df = pd.DataFrame(pd.DataFrame([('Bus Route A', 'Beach Station'),
('Bus Route B', 'Village Hotel '),
('Bus Route A', 'Amara Sanctuary Resort'),
('Bus Route C', 'Village Hotel '),
('Bus Route B', 'Beach Station'),
('Bus Route C', 'Beach Station')]))
What I is need is:
- Data (binary) that looks like:
[('Beach Station',1,1,1),('Village Hotel ',0,1,1), ( 'Amara Sanctuary Resort',1,0,0)] - Since Beach Station is present in all three routes, its values are 1, likewise for others as well.
- So that I can create three columns based on this created data.
