Consider the following Series:
created_at
2014-01-27 21:50:05.040961 80000.00
2014-03-12 18:46:45.517968 79900.00
2014-09-05 20:54:17.991260 63605.31
2014-11-04 01:16:08.286631 64405.31
2014-11-04 01:17:26.398272 63605.31
2014-11-04 01:24:38.225306 64405.31
2014-11-13 19:32:14.273478 65205.31
Name: my_series, dtype: float64
I need to sample this Series on a specific set of pre-defined days (e.g. every day from 2014-12-01
to 2014-12-07
). On each such sample, I would like to get the most recent value available from the original Series.
I have been looking at resample
(see also this and this thread), since it looks like the right tool for the job. However, I don't have a good grasp of the function yet.
Can resample
be used for this? If so, how?