I'm trying to plot date vs num with these datasets
date num
0 22/12/2022 09:09 7.92
1 22/12/2022 09:09 7.95
2 22/12/2022 09:09 7.98
3 22/12/2022 09:09 7.95
4 22/12/2022 09:09 7.93
... ... ...
4514 23/12/2022 14:48 5.68
4515 23/12/2022 14:48 5.68
4516 23/12/2022 14:48 5.69
4517 23/12/2022 14:48 5.70
4518 23/12/2022 14:48 5.66
When the date column type is a string it gets the correct plot
data_1.plot(x='date',y='num')
plt.xticks(rotation = 45)
However, when I converted the date to datetime, it plotted datetime which doesn't exist in data
data_1['date'] = pd.to_datetime(data_1['date'], format='%d/%m/%Y %H:%M')
data_1.plot(x='date',y='num')
plt.xticks(rotation = 45)
Do you know what is the problem? I'm having a hard time searching for the solution, thank you
Updated thanks for editing my question and giving me the solution, but still the solution is suggesting to convert to string not solve the problem using datetime