Column1 of data frame improperly labeled. Should change df -> df for subsetting functions