0
$\begingroup$

I have an array of data "SerTime" which is the sequential time in days, from the start of the series(2016-2018). I am not sure if this is serial time or not. I want to aggregate the data associated with this time data into hourly, daily, weekly, and monthly data and I don't know how to do that.

SerTime = array([[4.16666666e-02, 8.33333333e-02, 1.25000000e-01, ...,
       1.09591667e+03, 1.09595833e+03, 1.09600000e+03]])

```
$\endgroup$
3
  • $\begingroup$ Hey, since you are targeting to build a kind of data processor which will take an input and return it in another format or produce summary/annotation, I think you should add couple of example with input and associated output. $\endgroup$
    – jdsurya
    Sep 30, 2021 at 9:37
  • $\begingroup$ I am not sure if I know exactly how the end result of each data should be. What I know is that the final result needs to be something like yyyy/mm/dd $\endgroup$
    – Rim Sleimi
    Sep 30, 2021 at 9:41
  • $\begingroup$ Ok, unfortunately I can’t understand the problem from the given info, may be someone else will get it and help you.. $\endgroup$
    – jdsurya
    Sep 30, 2021 at 9:49

1 Answer 1

0
$\begingroup$

If you don't know what the correct output should be it will be hard to know if the conversion is correct, but try multiplying the values with the number of seconds in a day (86400) and work from there to convert them to whatever you need (e.g. the first value seems to be 3600 seconds, which is exactly 1 hour). Since you don't seem to have a start date(time) all times will be relative (i.e. t+3 seconds) instead of absolute.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.