To give attention to the need to rename of swap column names by using a pre-present record, I'll make a new sample dataframe df with First column names and unrelated new column names. CowperKettleCowperKettle 36.7k1818 gold badges137137 silver badges235235 bronze badges 2 Took me a while to discover how this https://louisttnes.ltfblog.com/35298000/a-simple-key-for-how-to-play-stack-ball-game-unveiled