months_of_data = 24
min_date = '2018-01-01'
cols = (pd.date_range(min_date, periods=months_of_data, freq='M')
.strftime('%Y %-m') # '%Y %m' for 2018 01, 2018 02, ...
.tolist())
>>> cols
['2018 1',
'2018 2',
'2018 3',
'2018 4',
'2018 5',
'2018 6',
'2018 7',
'2018 8',
'2018 9',
'2018 10',
'2018 11',
'2018 12',
'2019 1',
'2019 2',
'2019 3',
'2019 4',
'2019 5',
'2019 6',
'2019 7',
'2019 8',
'2019 9',
'2019 10',
'2019 11',
'2019 12']