Currently, I have 52 columns represent weeks, I want to merge every 4 columns(4 weeks) into one month. So I need to merge and add to new column every 4 columns. How do I merge and add every 4 columns? Pandas.sum doesn't work for me as it added up all the columns.
w1 w2 w3 w4 ... w52
1 0 0 1 ... 0
0 1 0 0 ... 1
What I want:
w1 w2 w3 w4 ... w52 1 2 3 4 ... 12
1 0 0 1 0 2 4 5 2 ... 4
0 1 0 0 ... 0 1 0 3 4 ... 5