1

I have a table like this:

enter image description here

and I would like to display dep_delay per time of day. Basically, I want to get rid of the date in dep_sched_time, group by the time and plot the dep_delay per time.

As simple as it sounds, I am stuck for quite some time here. Extracting the time only by using .dt.time does not help as matplotlib throws the error

float() argument must be a string or a real number, not 'datetime.time'

I also did not manage to convert the time to float or something similar. What is the best way to solve this?

Thank you already!

Paul1911
  • 163
  • 10
  • 1
    [Format the displayed date](https://matplotlib.org/stable/api/dates_api.html#date-formatters) instead of trying to convert the input. An example is, for instance, here: https://stackoverflow.com/a/65343940/8881141 – Mr. T Apr 20 '22 at 13:09

0 Answers0