add_index function

Adds a sequential index column to a data frame