I have the following problem. My DataFrame looks like this (only with 100.000 entries):
col_1 col_2 col_3
green yellow red
yellow green purple
green yellow red
yellow brown green
red yellow purple
red green yellow
What I want though, is that all the greens are in one column, all the reds and all the yellows, etc. So it should look like this:
col_1 col_2 col_3 col_4 col_5
green yellow red
green yellow purple
green yellow red
green yellow brown
yellow red purple
green yellow red
How do I do this? Thanks in advance.