I ran into such a problem, I have the following dataframe
and I would like to convert it to this kind of dataframe
I tried to solve this problem, but without success (( here is the code for creating a small dataframe
data = {'Date':['2020-01-01','2020-01-02','2020-01-03','2020-01-04','2020-01-05','2020-01-06','2020-01-07','2020-01-08','2020-01-09','2020-01-10','2020-01-11','2020-01-12','2020-01-13','2020-01-14'],
'year':['2020','2020','2020','2020','2020','2020','2020', '2020','2020','2020','2020','2020','2020','2020'],
'week':['1','1','1','1','1','1','1','2','2','2','2','2','2','2',]}
df_test = pd.DataFrame(data)

