I have this df:
KEGGnumber Cor Colors
X1 C00095 -2.623973e-01 RED
X2 C17714, C00044 -2.241113e-01 RED
X3 C00033 -3.066684e-01 RED
and would like to format it as a two column dataframe with each individual KEGGnumber
to be matched with its Color
. It would look something like this:
KEGGnumber Colors
C00095 RED
C17714 RED
C00044 RED
C00033 RED
Essentially, the new dataframe take the rows of the old dataframe with more than one KEGGnumber
and splits them up, while keeping the same Color
for each.