I have a relatively large dataframe with more than one hundred columns. Currently, only the first column was assigned a name, and the dataframe looks like:
Event 0 1 2 3 4 5 6 7 8 9 10 11 ...
I would like to rename the columns so that they look like
Event Name1 Job1 Name2 Job2 Name3 Job3 Name4 Job4 Name5 Job5 Name6 Job6 ...
Basically, for the even number columns, the names would become Name(number/2+1) and for the odd-number columns, the names would become Job((number+1)/2+1).
There was a similar question (generating column names iteratively in pandas) and I followed their method to first extract the odd columns and then assign the numbers, but the code did not really work.
I am wondering how should I do it?