I have a dataset that describes a question paper. I would like to map it with the marks obtained by the students and do some analysis. For that purpose, I wanted to melt the question paper details.
Question Marks BL PI CO PSO PO
0 Q1 2 2 1.4 1 1 1,2
1 Q2 2 3 2.1 2 1 1,2
2 Q3 2 2 1.1 1 1 1,2
3 Q4 2 2 1.1 1 1 1,2
4 Q5 4 2 1.1 1 1 1,2
I tried
qns = pd.read_csv('https://raw.githubusercontent.com/davidrajdgl/CodeSnippets/master/questions.tsv', sep="\t")
qns_melted = qns.melt(id_vars = ["Question", "Marks"])
qns_melted
But this doesnot seems to be helpful since, I wanted the value column to be generated by spliting the columns in there is a comma in the cell value.
For example,
Q1 2 PO 1
Q1 2 PO 2
How to achieve this?