I have some data which is formated by year and week. Here is a small sample
week cases
0 192801 7647
1 192802 11427
2 192803 11970
3 192804 12920
4 192805 14660
The week data looks as if it is formated like %Y%W
, but when I try to convert it to datetime via pd.to_datetime(df.week, format = '%Y%W)
I receive the first day of the first month of each year.
0 1928-01-01
1 1928-01-01
2 1928-01-01
3 1928-01-01
4 1928-01-01
What is going on? How can I format the week data correctly?