For the lack of a better explanation, I will add a picture. This is my dataframe:
df_for_plot
Out[403]:
hour dow month to
timestamp
2019-06-24 00:00:00 00:00 0 0 6 1
2019-06-24 01:00:00 00:00 1 0 6 1
2019-06-24 02:00:00 00:00 2 0 6 1
2019-06-24 03:00:00 00:00 3 0 6 2
2019-06-24 04:00:00 00:00 4 0 6 2
... ... ... ..
2019-09-20 19:00:00 00:00 19 4 9 1
2019-09-20 20:00:00 00:00 20 4 9 1
2019-09-20 21:00:00 00:00 21 4 9 1
2019-09-20 22:00:00 00:00 22 4 9 1
2019-09-20 23:00:00 00:00 23 4 9 1
[34848 rows x 4 columns]
set(df_for_plot["to"])
Out[404]: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
I would like to plot something like this so that hour
and dow
are representing the values on the axis and the to
column will be plotted as a variable, represented by some signs, like in this visual example I quickly drew
Is there a way to do something like this in python?
CodePudding user response: