0

I have a a very large dataset containing id and data points of time series (with some missing values). The following is just an example.

I will need to create a lead variable for a variable across groups built on account id such that last value across each account id is null. Please refer below for more clarity.

id    time    value    lag_value 
A     2000    10       11     
A     2001    11       Nan 
B     2002    1        2
B     2003    2        3 
B     2004    3        Nan 
mechanical_meat
  • 163,903
  • 24
  • 228
  • 223

0 Answers0