my input is a Spark dataframe :
EventTime,Signal
0,-65
10,-63
20,-71
40,-65
50,-62
80,-81
90,-84
100,-81
...
85460,-71
85480,-66
85490,-89
85500,-80
I would like to get the mean of Signal for each 900 seconds of EventTime
, the output looks like this :
EventTime, MeanSignal
0, mean
900, mean
1800, mean
...
85500, mean
My problem is that there is not a regular step of EventTime in the regular data, so I can't split the dataframe in same length parts...