Select columns based on dates - Pandas

Richard Medina medina.rc at gmail.com
Thu Sep 2 15:28:31 EDT 2021


Hello, forum,
I have a data frame with covid-19 cases per month from 2019 - 2021 like a header like this:

Country, 01/01/2019, 2/01/2019, 01/02/2019, 3/01/2019, ... 01/01/2021, 2/01/2021, 01/02/2021, 3/01/2021

I want to filter my data frame for columns of a specific month range of march to September of 2019, 2020, and 2021 only (three data frames). 

Any ideas?
Thank you




More information about the Python-list mailing list