Rearranging dataframe dimensions

Viewed 76

I have a df with lots of columns :

   date  risk lev   chemical  weight    date    risk lev   chemical  weight
 15-5-16   5         Potasium   5mg    15-5-16      3       Sodium     7 mg 
 14-5-16   6         Potasium   10mg   14-5-16      2       Sodium     2 mg  

I would like to re-arrange it so that each 4 columns breaks into a new row , such as the df is like this:

   date  risk lev   chemical  weight
 15-5-16      5      Potasium   5mg   
 15-5-16      3       Sodium    7mg  
 14-5-16      6      Potasium   10mg   
 14-5-16      2       Sodium    2mg

Sorry that I do not include my try but is the first time I counter this issue and not sure how to proceed

3 Answers
Related