Home » Python » resampling – How to split time into 10 min interval and make it as a separate column using Python – Stack Overflow

resampling – How to split time into 10 min interval and make it as a separate column using Python – Stack Overflow

Posted by: admin February 20, 2020 Leave a comment

Questions:

I am working on a data set that has epoch time. I want to create a new column which splits the time into 10 mins time interval.

Suppose
timestamp timeblocks
5:00 1
5:02 1
5:11 2

How can i achieve this using python.
I tried resampling but i cannot able further process.

Answers:

I agree with the comments, you need to provide more. After guessing what you’re looking for, you may want histograms where intervals are known as bins. You wrote “10 mins time interval” but your example doesn’t show 10 mins.

Python’s Numpy and matplotlib have histograms for epochs.

Here’s an SO answer on histogram for epoch time.