Can you clarify what you mean with an actual example ? For example, if your data frame looks like this:
ID Year Value 1 2012 100 2 2013 101 3 2014 102 What's your desired output ? Femi On Sat, Jan 9, 2016 at 4:55 PM, Franc Carter <[email protected]> wrote: > > Hi, > > I have a DataFrame with the columns > > ID,Year,Value > > I'd like to create a new Column that is Value2-Value1 where the > corresponding Year2=Year-1 > > At the moment I am creating a new DataFrame with renamed columns and doing > > DF.join(DF2, . . . .) > > This looks cumbersome to me, is there abtter way ? > > thanks > > > -- > Franc > -- http://www.femibyte.com/twiki5/bin/view/Tech/ http://www.nextmatrix.com "Great spirits have always encountered violent opposition from mediocre minds." - Albert Einstein.
