Of course there's a way :)
You can use the isna function to check if a value is NA or not. There's
also the dropna function which takes a DataArray as input and returns a
regular Vector with the NA elements removed.
You could try something like the following:
firstbreakcol = 4
lastbreakcol =
Many thanks for the solution and it works well with the example posted.
But, if I have missing values in one of the columns, it throws an error.
sdt2 = DataFrame(ID = 1:2, StartTime = DateTime(["4/13/2016 07:00",
"4/13/2016 07:15"], "m/d/y H:M"),
EndTime =
I'm not 100% sure I understand your question, but let me give it a shot.
First thing is to note why you're getting that MethodError. It's from the
line
println(si in sdt1[i, [:BreakTime1, :BreakTime2]])
Define sdt1 as you do (I just copied into a Julia REPL) and set i = 1 to
for the first