In the following snippet of code, I am trying to rename some columns (containing Hosted Meetings
) to Hosted Meetings [date]
. This is what happens when I print all the i
's. However, it does not save this to df
.
all_users_sheets_hosts = []
for f in glob.glob("./users-export-*.xlsx"):
df = pd.read_excel(f)
all_users_sheets_hosts.append(df)
j = re.search('(\d+)', f)
for i in df.columns.values:
if 'Hosted Meetings' in i:
i = ('Hosted Meetings' + ' ' + j.group(1))