1. Learn
  2. /
  3. Courses
  4. /
  5. Helsinki Open Data Science

Connected

Exercise

Modifying column names

Sometimes you want to rename your colums. You could do this by creating copies of the columns with new names, but you can also directly get and set the column names of a data frame, using the function colnames().

The dplyr library has a rename() function, which can also be used. Remember the cheatsheet.

Instructions

100 XP
  • Print out the column names of learning2014
  • Change the name of the second column to 'age'
  • Change the name of 'Points' to 'points'
  • Print out the column names again to see the changes