Quite shortly: I have this DataFrame Dataframe
In the dataframe I have some duplicated columns with different values. How can I fix it so these have different column-names?
df_temporary.rename(columns={df_temporary.columns[3]: "OeFG%"}, inplace=True)
df_temporary.rename(columns={df_temporary.columns[11]:"DeFG%"}, inplace=True)
df_temporary.rename(columns={df_temporary.columns[5]: "OTOV%"}, inplace=True)
df_temporary.rename(columns={df_temporary.columns[13]: "DTOV%"}, inplace=True)
df_temporary.rename(columns={df_temporary.columns[8]: "OFT/FGA"}, inplace=True)
df_temporary.rename(columns={df_temporary.columns[-1]: "DFT/FGA"}, inplace=True)
df_temporary
I attempted using rename, first with all in one columns in one {}, and then hardcoding each of them afterwards; both resulting in the same result.
I also tried following this: Renaming columns in a Pandas dataframe with duplicate column names?
Not much success implementing these in my code however.