I have a bigger code from which I obtain some datetime object for some events (YYYY-MM-DD) for two years (2021,2022) out of which I want to group data together in a nested dictionary structure. For a particular event, I want the following structure -
event_name:
{2021:
{01:
number_of_datetime_having_month january,
02:
number_of_datetime_having_month_feb
...etc etc upto december},
2022:
{01:
number_of_datetime_having_month_january,
........etc etc upto december}
}
I am planning to write this data to csv and plot this afterwards. I am wondering what will be the best approach. Hard-coding the schema beforehand?