I would like to move variable names to the 1st row observations (as string)
In the following example, I would like the variable dates to become the first row of observations (the new names of the columns do not matter)
In other words, I'm trying the opposite of what "nrow" does. Please help.
In the following example, I would like the variable dates to become the first row of observations (the new names of the columns do not matter)
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str8 DATATYPE double(__7_8_2020 __7_1_2020 _6_24_2020 _6_17_2020 _6_10_2020 __6_3_2020 _5_27_2020 _5_20_2020 _5_13_2020) "SP500_w" 6496.14 6383.76 6247.66 6375.54 6529.42 6389.67 6209.38 6075.76 5761.7 "VIX_w" 28.08 28.62 33.84 33.47 27.57 25.66 27.62 27.99 35.28 end
Comment