I have a df with a date column:
import pandas as pd
df=pd.read_csv("patients_by_day.csv", sep=";")
df.head()
DATE N_PAT
20200303 1
20200307 1
20200311 1
20200314 2
20200316 4
df.DATE
0 20200303
1 20200307
2 20200311
3 20200314
4 20200316
...
193228 20210703
193229 20210704
Name: DATE, Length: 193230, dtype: int64
So, as you can see, I'm not importing properly that column.
It has the format YYYYMMDD, and I would like to see it as a date type with the format YYYY-MM-DD.
I was looking to solve this problem but couldn't find any way.