I've seen dozens of similar questions but I couldn't make a final effect like I want.
Data frame structure is filled with measurements taken nearly every minute (25k+ rows):
some_val
...
2020-02-22 00:00:00 1.1
2020-02-22 00:01:01 1.4
2020-02-22 00:02:01 1.5
...
2020-02-23 00:00:05 1.7
2020-02-23 00:01:05 1.6
2020-02-23 00:02:06 1.6
...
2020-02-24 00:00:02 1.4
2020-02-24 00:01:03 1.8
2020-02-24 00:02:03 1.3
I want to group that data frame by each minute of a day - so first group (time of a day 00:00) should consist of [1.1, 1.7, 1.4] and so on.
Then I want to see some trends by plotting it on 1 figure where:
- X axis is time with step of 1 minute (00:00, 00:01, ..., 23:59)
- Y axis are
some_val
- as many measurements per each X time as they are in each group
For now I don't want to count()
or mean()
anything. Just simple grouping, plotting everything on 1 figure and saving it to file.
As I read I should be able to use pandas groupby
or resample
along with matplotlib.pyplot
but somehow I couldn't manage to do it.
Thanks in advance.