I'm trying to plot my table into a graph which has dates, from what I've learnt I've changed the date column into recognisable date by
pd.to_datetime(df["Date"], format="%Y%m%d")
My data looks something like this:
Date | DailyPositive | |
---|---|---|
1 | 20200101 | 1 |
2 | 20200102 | 2 |
3 | 20200103 | 4 |
When I try plotting it, my graphs came out like this, I'm assuming it somehow plotted against the index instead?
How do I plot the date at X axis, and the cases at Y-axis? Also since my date runs across two years, is there a way for to make the X-axis date go in like maybe few months apart?
I've searched around and saw way too many different solutions for me to understand :(
Thank you!!