I have a dataset of runners going through checkpoints it looks like this:
data = {'Runner': ['Tom', 'Joseph', 'Krish'],
'Start': [30/04/2021 05:27:19, 30/04/2021 05:33:50, 30/04/2021 05:43:32],
'First Checkpoint': [30/04/2021 05:40:45, 30/04/2021 05:36:59, 30/04/2021 05:59:03],
'Second Checkpoint': [30/04/2021 05:42:50, 30/04/2021 05:42:31, 30/04/2021 06:01:19],
'Third Checkpoint': [30/04/2021 05:42:53, 30/04/2021 05:42:33, 30/04/2021 06:01:37]}
df = pd.DataFrame(data)
I would like to visualize this data as a stacked barplot but using the Start column as the first ticker in the graph.
My problems are that datetime64[ns]
is not supported by matplotlib and I can't find a workaround to even start plotting.
Any help on this?
You need to convert data to proper DateTime format using pd.to_datetime