I have weather data (max temp) of UK in Ascii text format for 10 years. Each text file contain weather data one month for different locations. Data frame 1 to 12 as January to December for each year so 12 months x 10 years = 120 files / data frames in following format:
Data Frame 1 [Year 1 January]: 24.65 23.44 22.55 21.33 23.22 ....... n
Data Frame 2 [Year 1 February] 16.81 21.13 14.37 11.17 22.29 ....... n
Data Frame 3 to 12 [Year 1 March to December] ...........
Data Frame 13 [Year 2 January] 11.10 10.89 11.71 16.78 12.11 ....... n
Data Frame 14 [Year 2 February] 14.43 17.33 20.51 18.54 14.62 ....... n
i want to generate a code that read all text files and then pick 1st value of data frame 1 and then 1st value of data frame 2 and so on ....
At the end, data frame should look like this:
Location Year Jan Feb Mar Apr May ........ December Location 1 Year 1: 24.65 16.81 x x x ......... x Location 1 Year 2: 11.10 14.43 x x x ......... x . . Location 1 Year 10: x x x x x ......... x Location 2 Year 1: 23.44 21.13 x x x ......... x Location 2 Year 2: 10.89 17.33 x x x ......... x . . Location n Year 10: x x x x x ......... x
Then to Save this new data frame into Ascii text.
Can anyone help please? Quite complicated to to use any function. enter image description here