These are chat archives for ipython/ipython

13th
Jan 2019
Dr .Muhammad Anjum Iqbal
@DrMuhammadAnju1_twitter
Jan 13 04:55
Sir, I have 2 years data on daily basis for 12 months , I want to convert it in to monthly averages for each moth , Please help me . I am using jupyter . I am new user , Please help me
Dr .Muhammad Anjum Iqbal
@DrMuhammadAnju1_twitter
Jan 13 05:09

11552Sir, I have 2 years temparature data on daily basis for 12 months , I want to convert it in to monthly averages for each moth , Please help me . I am using jupyter . I am new user , Please help me

Dr .Muhammad Anjum Iqbal
@DrMuhammadAnju1_twitter
Jan 13 05:33
@guysv Sir, I have 2 years data on daily basis for 12 months , I want to convert it in to monthly averages for each moth , Please help me . I am new user , Please help me to write the code
@jagan96 Sir, I have 2 years data on daily basis for 12 months , I want to convert it in to monthly averages for each moth , Please help me . I am new user , Please help me to write the code
Andrew
@sheerluck
Jan 13 17:24
@DrMuhammadAnju1_twitter
x2017_01 = [12,23,15,11,20,...]
x2017_02 = [23,15,11,20,17,...]
...
x2017_12 = [15,11,20,17,22,...]

x2018_01 = [12,23,15,11,20,...]
x2018_02 = [23,15,11,20,17,...]
...
x2018_12 = [15,11,20,17,22,...]

year2017 = [x2017_01, x2017_02, ..., x2017_12]
year2018 = [x2018_01, x2018_02, ..., x2018_12]

data = [year2017, year2018]

result = []
for year in data:
    for month in year:
        average = sum(month)/len(month)
        result.append(average)

result       # [16.2, 17.2, 17.6, 18.0, ....]
len(result)  # 24