Given the following data:
dt = pd.DataFrame.from_dict(
{
"thing": {0: "A", 1: "B", 2: "C"},
"min": {
0: "2021-11-01 00:00:00+00:00",
1: "2021-11-01 00:00:00+00:00",
2: "2021-11-01 00:00:00+00:00",
},
"max": {
0: "2021-11-02 00:00:00+00:00",
1: "2021-11-05 00:00:00+00:00",
2: "2021-11-07 00:00:00+00:00",
},
}
).assign(
min=lambda x: pd.to_datetime(x["min"]),
max=lambda x: pd.to_datetime(x["max"]),
)
Which looks like:
| | thing | min | max |
|---:|:--------|:--------------------------|:--------------------------|
| 0 | A | 2021-11-01 00:00:00+00:00 | 2021-11-02 00:00:00+00:00 |
| 1 | B | 2021-11-01 00:00:00+00:00 | 2021-11-05 00:00:00+00:00 |
| 2 | C | 2021-11-01 00:00:00+00:00 | 2021-11-07 00:00:00+00:00 |
I would like to create a plot which has thing on the y-axis, and each a line representing the min / max on the x-axis.
Eg:
So the x-axis is the date, and the y-axis represents each 'thing'.


