I have a dataframe that looks like this:
+------------+-----------+-----+-----+----------+----------+-----+------------+----------+----------+-----+------------+
| State_Name | City_Name | ID1 | ID2 | 1/1/2020 | 1/2/2020 | ... | 12/31/2020 | 1/1/2021 | 1/2/2021 | ... | 12/31/2021 |
+------------+-----------+-----+-----+----------+----------+-----+------------+----------+----------+-----+------------+
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
+------------+-----------+-----+-----+----------+----------+-----+------------+----------+----------+-----+------------+
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
+------------+-----------+-----+-----+----------+----------+-----+------------+----------+----------+-----+------------+
I have a lot of columns from 1/1/2020 all the way to 12/31/2021. How do I select columns that contain specific months of a year? For example, if I want select columns that contain July 2021 data, I can subset columns with name '7/1/2021', '7/2/2021'......'7/31/2021'?
Thanks so much for your help!