I would like to create a bar graph to show the number of sick people in a place each week using Python. The end date of the week is to be input by the user. The bar graph should show exactly 7 days before and including the end date even when the date is missing in the dataset.
The location is always the same and should be the title of the bar graph
Below is my dataset:
end_date = 2022-10-18
data = {'Date': [2022-10-14, 2022-10-14, 2022-10-14, 2022-10-15, 2022-10-16, 2022-10-16, 2022-10-17],
'Location': ['Lion House', 'Lion House', 'Lion House', 'Lion House', 'Lion House', 'Lion House', 'Lion House']}
df = pd.DataFrame(data)
My first objective is to transform df with all the dates from 2022-10-12 to 2022-10-18 with the relevant cases thus producing a dataframe as below.
data1 = {'Date': [2022-10-12, 2022-10-13, 2022-10-14, 2022-10-15, 2022-10-16, 2022-10-17, 2022-10-18],
'Count': [0, 0, 3, 1, 2, 1, 0]}
df_transform = pd.DataFrame(data1)
I know I can sum up the count using groupby and sum but I do not know how to insert the missing dates to create exactly one week and finally plot the graph.
Any help is much appreciated as I am new to Python.
Thank you.

