I have a pandas data frame which contains data that looks like below
import pandas as pd
data = [['0','2018-03-01','2020-04-11'],['1','2017-11-17','2020-11-16'],['2','2017-07-12','2020-07-12']]
df = pd.DataFrame(data,columns=['account_number','contract_start_date','contract_end_date'])
df
I need to break each account's contract into 365 day periods using the contract_start_date and contract_end_date. The last period needs to contain whatever days remain. An example of that is below

what I have tried so far: I tried to create a new data frame and thought I could generate the 365 periods using date ranges. It hasn't worked as I hoped. Would appreciate any guidance.
new_df= pd.concat([pd.DataFrame({'start_date': pd.date_range(row.contract_start_date, row.contract_end_date, freq ='365D'),
'account_number': row.account_number
}) for row in df.itertuples()], ignore_index=True)
new_df
