I have a data set with baseball players and a lot of info on them: Name Team Var1 Val1 Var2 Val2 Var3 Val3 Allanson, Andy Cleveland At_bat 293 n_hits 66 n_home 1 Ashby, Alan Houston At_bat 315 n_hits 81 n_home 7 Davis, Alan Seattle At_bat 479 n_hits 130 n_home 18 Dawson, Andre Montreal At_bat 496 n_hits 141 n_home 20 Galarraga, Andres Montreal At_bat 321 n_hits 87 n_home 10 I want to create a program that goes through all of the columns and renames Val_i to the value of Var_i and drops the Var_i columns: Name Team At_bat n_hits n_home Allanson, Andy Cleveland 293 66 1 Ashby, Alan Houston 315 81 7 Davis, Alan Seattle 479 130 18 Dawson, Andre Montreal 496 141 20 Galarraga, Andres Montreal 321 87 10 Can anyone help?
... View more