Added comments
Changed names of dataframe header
changed data to be put in df to value instead of mean
added comment about how to extract gradient from function
Added "dir" to allow choice of columns, ie Rev or For, without naming them; Adds possiblity of quickly selecting column to produce data, and usage beyond datasets where names are known.