I have 143 column names in my df and 141 columns has same column format as shown below and want to update last 3 bytes of column name with month for columns starting with passengers or want to update whole column like '2009-jan' format based on targeted value
0: 'airport', 1: 'type of traffic', 2: 'Passengers 2009M01', 3: 'Passengers 2009M02', 4: 'Passengers 2009M03', 5: 'Passengers 2009M04', 6: 'Passengers 2009M05', 7: 'Passengers 2009M06', 8: 'Passengers 2009M07', 9: 'Passengers 2009M08', 10: 'Passengers 2009M09', 11: 'Passengers 2009M10',
question from:https://stackoverflow.com/questions/65907190/looking-for-an-ideas-to-implement-dynamic-column-renaming-in-pandas