I have an existing dataframe like this:
desease occurences symptoms
s1_d1
1 desease_1 200 s2_d1
s3_d1
s1_d2
2 desease_2 300 s2_d2
s3_d2
and I would like to create a new one based on this like this
s1_d1 s2_d1 s3_d1 s1_d2 s2_d2 s3_d2 occurences desease
1 1 1 1 0 0 0 200 desease_1
2 0 0 0 1 1 1 300 desease_2
I tried a lot of methods but didn't get any interesting result, can someone help me with one good astuce please?