Repartition Frequency Right-side Inclusion #9300
Unanswered
mzamora808
asked this question in
Q&A
Replies: 1 comment
-
@mzamora808 Welcome! Maybe something like Also, note that we mainly use Discourse for usage questions. :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a day's worth of data spread out across partitions, sorted and indexed by timestamp. I'd like to repartition so that I then have a partition for each hour. I'm aware that I can provide "1H" to the
freq
argument of therepartition
method in order to split by hour, but this assumes that you want the partitions to be divided like this: [[00:00, 01:00), [01:00, 02:00), [02:00, 03:00), ...]. The bottom of the hour is included at the beginning of each partition. I'm going to be running the ceiling method on all timestamps, so I'd prefer if the divisions were right-side inclusive instead: [(00:00, 01:00], (01:00, 02:00], ...]. I've already tried making a new column in which I offset the original timestamp column by -1 microsecond, set that as the index, and repartition on that column. That works, but I'm not sure if it's the most efficient way to handle this.Does anyone know of a better way to accomplish this right-side inclusion?
Beta Was this translation helpful? Give feedback.
All reactions