示例:通过使用
df['Week_Number'] = df['Date'].dt.strftime('%U')
for 29/12/2019 the week is 52. and this week is from 29/12/2019 to 04/01/2020.
but for 01/01/2020 the week is getting as 00.
Run Code Online (Sandbox Code Playgroud)
我要求 01/01/2020 的周也为 52。05/01/2020 到 11/01/2020 的周也为 53。这需要继续。