Hi how’s it going?
I have a situation where I’m keeping counts of certain visits, and in some scenarios the person visits multiple places during one trip. However, I can’t have this as part of my data, and need it to be redistributed. Let me get to the example so this doesn’t sound like complete jargon!
df = DataFrame(:person=>["bob","phil","nick"],:london=>[1,1,0],:spain=>[1,0,0],Symbol("london,spain")=>[1,1,1])
What I would like to do is scan all the columns that have a delimiter in it, and then redistribute those columns among existing columns in the dataframe (if the existing column exists). Here would be the desired output.