Student ID | Subject Name 1 | Subject Marks 1 | Subject Name 2 | Subject Marks 2 | Subject Name 3 | Subject Marks 3 | Subject Name 4 | Subject Marks 4 |
1 | Math | 90 | Geography | 75 | Physics | 65 | Arabic Language | 90 |
2 | Biology | 78 | Chemistry | 70 | Geography | 90 | English | 85 |
3 | Arabic | 88 | Persian | 75 | English | 65 | Math | 78 |
4 | Biology | 75 | Physics | 100 | Chemistry | 90 | Math | 100 |
I personally think (you may also suggest other solutions) that in order to analyze this dataset, it is important to rearrange them and subject names should be made variable names and obtained marks should be listed against respective subjects for each student. For this, I can create new variables for each subject name.
I want to know that after creating new variables, how can I traverse each row (each student record) and find the marks of subject 1 and then copy those marks under subject_1 (new variable) and subject 2 marks under subject_2 (new variable) and so on for all subjects.
I will be thankful if someone can guide me.
Thank you
0 Response to Rearranging Data for Correct Data Analysis
Post a Comment