[I've attached a picture of my Series and the code to obtain the series , how would I obtain the number of days between a 1 and the next 0. For example, the number of days between the first 1 and next 0 is 4 days (1st August to 5th August], the number of days between the next 1 an 0 is also 4 days [8th august to 12 August 1
values = [1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1]
dates =['2019-08-01', '2019-08-02', '2019-08-05', '2019-08-06',
'2019-08-07', '2019-08-08', '2019-08-09', '2019-08-12',
'2019-08-13', '2019-08-14', '2019-08-15', '2019-08-16',
'2019-08-19', '2019-08-20', '2019-08-21', '2019-08-22',
'2019-08-23', '2019-08-26', '2019-08-27', '2019-08-28',
'2019-08-29', '2019-08-30']
pd.Series(values, index = dates)