Not able to use lag and lead function

The function names just aren’t imported in the latest ShiftedArrays version, so you need to either qualify ShiftedArrays.lead or import them explicitly:

julia> using DataFrames; import ShiftedArrays: lead, lag

julia> transform(DataFrame(TIME = rand(5)), :TIME .=> [lag, lead])
5×3 DataFrame
 Row │ TIME      TIME_lag        TIME_lead      
     │ Float64   Float64?        Float64?       
─────┼──────────────────────────────────────────
   1 │ 0.543515  missing               0.745711
   2 │ 0.745711        0.543515        0.181031
   3 │ 0.181031        0.745711        0.765985
   4 │ 0.765985        0.181031        0.201351
   5 │ 0.201351        0.765985  missing        
5 Likes