Premium problem66. Mean Value in Leap-Year Februaries

Medium Locked

s is indexed by daily dates. Return the mean of the values whose date falls in February of a leap year.

Input

2020-01-15     0.0
2020-01-16     1.0
2020-01-17     2.0
2020-01-18     3.0
2020-01-19     4.0
              ... 
2020-03-10    55.0
2020-03-11    56.0
2020-03-12    57.0
2020-03-13    58.0
2020-03-14    59.0
Freq: D, Length: 60, dtype: float64

Output

np.float64(31.0)

Premium problem

This one's part of Premium. Unlock the full Pandas track plus every other premium problem on the site.

Implement solve(...)