0

I have a csv file that looks like this

monitor_date            heartbeat
2017-07-21 07:08:20    91.000000
2017-07-21 07:08:20    90.500000
2017-07-21 07:08:21    90.333333
2017-07-21 07:08:22    89.750000
2017-07-21 07:08:22    89.400000
2017-07-21 07:08:23    89.333333
2017-07-21 07:08:24    89.285714
2017-07-21 07:08:25    89.125000
2017-07-21 07:08:25    89.000000
....   
2017-07-21 18:03:18    95.850840
2017-07-21 18:03:19    95.863445
2017-07-21 18:03:20    95.871849
2017-07-21 18:03:21    95.896842
2017-07-21 18:03:21    95.882353
2017-07-21 18:03:22    95.901053
2017-07-21 18:03:23    95.898947
2017-07-21 18:03:23    95.880252
2017-07-21 18:03:23    95.861635

my objective right now is to find the exponential moving average of the sample for every 30seconds,i have found some functions that calculates the the EMA ,but however the window of the EMA depends on the number of data

Is there anyway to tell python to calculate the EMA for every 30seconds?Please help

0 Answers0