I know I can rename single pandas.DataFrame columns with:
drugInfo.rename(columns = {'col_1': 'col_1_new_name'}, inplace = True)
But I'd like to rename a column without knowing its name (based on its index - although I know dictionaries don't have it). I would like rename column number 1 like this:
drugInfo.rename(columns = {1: 'col_1_new_name'}, inplace = True)
But in the DataFrame.columns dict there is no '1' entry, so no renaming is done. How could I achieve this?