I have a large dataset with a date column (which is not the index) with the following format %Y-%m-%d %H:%M:%S
.
I would like to create quarterly subsets of this data frame i.e. the data frame dfQ1
would contain all rows where the date was between month [1 and 4], dfQ2
would contain all rows where the date was between month [5 and 8], etc... The header of the subsets is the same as that of the main data frame.
How can I do this?
Thanks!